- Timestamp:
- May 22, 2013 1:02:37 PM (12 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Debugger/DBGCEmulateCodeView.cpp
r46165 r46217 1394 1394 1395 1395 /** 1396 * @interface_method_impl{FNDBCCMD, The 'rg', 'rg64' and 'rg32' commands.} 1396 * @interface_method_impl{FNDBCCMD, 1397 * The 'rg', 'rg64' and 'rg32' commands, worker for 'r'.} 1397 1398 */ 1398 1399 static DECLCALLBACK(int) dbgcCmdRegGuest(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs) … … 1405 1406 PDBGC pDbgc = DBGC_CMDHLP2DBGC(pCmdHlp); 1406 1407 bool const f64BitMode = !strcmp(pCmd->pszCmd, "rg64") 1407 || ( !strcmp(pCmd->pszCmd, "rg32")1408 && CPUMIsGuestIn64BitCode(VMMR3GetCpuByIdU(pUVM, pDbgc->idCpu)));1408 || ( strcmp(pCmd->pszCmd, "rg32") != 0 1409 && DBGFR3CpuIsIn64BitCode(pUVM, pDbgc->idCpu)); 1409 1410 char szDisAndRegs[8192]; 1410 1411 int rc; -
trunk/src/VBox/Debugger/testcase/tstDBGCStubs.cpp
r46167 r46217 303 303 return 1; 304 304 } 305 VMMR3DECL(bool) DBGFR3CpuIsIn64BitCode(PUVM pUVM, VMCPUID idCpu) 306 { 307 return false; 308 } 305 309 306 310 VMMR3DECL(int) DBGFR3CoreWrite(PUVM pUVM, const char *pszFilename, bool fReplaceFile) -
trunk/src/VBox/VMM/VMMR3/DBGFCpu.cpp
r44529 r46217 71 71 72 72 /** 73 * Wrapper around CPUMIsGuestIn64BitCode. 74 * 75 * @returns VINF_SUCCESS. 76 * @param pVM Pointer to the VM. 77 * @param idCpu The current CPU ID. 78 * @param pfIn64BitCode Where to return the result. 79 */ 80 static DECLCALLBACK(int) dbgfR3CpuIn64BitCode(PVM pVM, VMCPUID idCpu, bool *pfIn64BitCode) 81 { 82 Assert(idCpu == VMMGetCpuId(pVM)); 83 PVMCPU pVCpu = VMMGetCpuById(pVM, idCpu); 84 *pfIn64BitCode = CPUMIsGuestIn64BitCode(pVCpu); 85 return VINF_SUCCESS; 86 } 87 88 89 /** 90 * Checks if the given CPU is executing 64-bit code or not. 91 * 92 * @returns true / false accordingly. 93 * @param pUVM The user mode VM handle. 94 * @param idCpu The target CPU ID. 95 */ 96 VMMR3DECL(bool) DBGFR3CpuIsIn64BitCode(PUVM pUVM, VMCPUID idCpu) 97 { 98 UVM_ASSERT_VALID_EXT_RETURN(pUVM, false); 99 VM_ASSERT_VALID_EXT_RETURN(pUVM->pVM, false); 100 AssertReturn(idCpu < pUVM->pVM->cCpus, false); 101 102 CPUMMODE fIn64BitCode; 103 int rc = VMR3ReqPriorityCallWaitU(pUVM, idCpu, (PFNRT)dbgfR3CpuIn64BitCode, 3, pUVM->pVM, idCpu, &fIn64BitCode); 104 if (RT_FAILURE(rc)) 105 return false; 106 return fIn64BitCode; 107 } 108 109 110 /** 73 111 * Get the number of CPUs (or threads if you insist). 74 112 *
Note:
See TracChangeset
for help on using the changeset viewer.