Changeset 47569 in vbox for trunk/src/VBox
- Timestamp:
- Aug 7, 2013 3:13:21 AM (11 years ago)
- Location:
- trunk/src/VBox/Debugger
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Debugger/DBGCEmulateCodeView.cpp
r46221 r47569 939 939 if (!DBGCVAR_ISPOINTER(pDbgc->DisasmPos.enmType)) 940 940 { 941 /** @todo Batch query CS, RIP & CPU mode. */941 /** @todo Batch query CS, RIP, CPU mode and flags. */ 942 942 PVMCPU pVCpu = VMMR3GetCpuByIdU(pUVM, pDbgc->idCpu); 943 943 if ( pDbgc->fRegCtxGuest … … 952 952 pDbgc->SourcePos.u.GCFar.off = pDbgc->fRegCtxGuest ? CPUMGetGuestEIP(pVCpu) : CPUMGetHyperEIP(pVCpu); 953 953 pDbgc->SourcePos.u.GCFar.sel = pDbgc->fRegCtxGuest ? CPUMGetGuestCS(pVCpu) : CPUMGetHyperCS(pVCpu); 954 if ( (fFlags & DBGF_DISAS_FLAGS_MODE_MASK) == DBGF_DISAS_FLAGS_DEFAULT_MODE 955 && pDbgc->fRegCtxGuest 956 && (CPUMGetGuestEFlags(pVCpu) & X86_EFL_VM)) 957 { 958 fFlags &= ~DBGF_DISAS_FLAGS_MODE_MASK; 959 fFlags |= DBGF_DISAS_FLAGS_16BIT_REAL_MODE; 960 } 954 961 } 955 962 … … 958 965 else 959 966 fFlags |= DBGF_DISAS_FLAGS_CURRENT_HYPER | DBGF_DISAS_FLAGS_HYPER; 967 } 968 else if ((fFlags & DBGF_DISAS_FLAGS_MODE_MASK) == DBGF_DISAS_FLAGS_DEFAULT_MODE && pDbgc->fDisasm) 969 { 970 fFlags &= ~DBGF_DISAS_FLAGS_MODE_MASK; 971 fFlags |= pDbgc->fDisasm & (DBGF_DISAS_FLAGS_MODE_MASK | DBGF_DISAS_FLAGS_HYPER); 960 972 } 961 973 pDbgc->DisasmPos.enmRangeType = DBGCVAR_RANGE_NONE; … … 1015 1027 1016 1028 DBGFADDRESS CurAddr; 1017 rc = DBGCCmdHlpVarToDbgfAddr(pCmdHlp, &pDbgc->DisasmPos, &CurAddr); 1018 if (RT_FAILURE(rc)) 1019 return DBGCCmdHlpFailRc(pCmdHlp, pCmd, rc, "DBGCCmdHlpVarToDbgfAddr failed on '%Dv'", &pDbgc->DisasmPos); 1029 if ( (fFlags & DBGF_DISAS_FLAGS_MODE_MASK) == DBGF_DISAS_FLAGS_16BIT_REAL_MODE 1030 && pDbgc->DisasmPos.enmType == DBGCVAR_TYPE_GC_FAR) 1031 DBGFR3AddrFromFlat(pUVM, &CurAddr, ((uint32_t)pDbgc->DisasmPos.u.GCFar.sel << 4) + pDbgc->DisasmPos.u.GCFar.off); 1032 else 1033 { 1034 rc = DBGCCmdHlpVarToDbgfAddr(pCmdHlp, &pDbgc->DisasmPos, &CurAddr); 1035 if (RT_FAILURE(rc)) 1036 return DBGCCmdHlpFailRc(pCmdHlp, pCmd, rc, "DBGCCmdHlpVarToDbgfAddr failed on '%Dv'", &pDbgc->DisasmPos); 1037 } 1020 1038 1021 1039 if (CurAddr.fFlags & DBGFADDRESS_FLAGS_HMA) 1022 1040 fFlags |= DBGF_DISAS_FLAGS_HYPER; /* This crap is due to not using DBGFADDRESS as DBGFR3Disas* input. */ 1041 pDbgc->fDisasm = fFlags; 1023 1042 1024 1043 /* … … 1084 1103 if (cbCheckSymbol <= cbInstr) 1085 1104 { 1086 rc = DBGCCmdHlpVarToDbgfAddr(pCmdHlp, &pDbgc->DisasmPos, &CurAddr); 1105 if ( (fFlags & DBGF_DISAS_FLAGS_MODE_MASK) == DBGF_DISAS_FLAGS_16BIT_REAL_MODE 1106 && pDbgc->DisasmPos.enmType == DBGCVAR_TYPE_GC_FAR) 1107 DBGFR3AddrFromFlat(pUVM, &CurAddr, ((uint32_t)pDbgc->DisasmPos.u.GCFar.sel << 4) + pDbgc->DisasmPos.u.GCFar.off); 1108 else 1109 rc = DBGCCmdHlpVarToDbgfAddr(pCmdHlp, &pDbgc->DisasmPos, &CurAddr); 1087 1110 if (RT_SUCCESS(rc)) 1088 1111 dbgcCmdUnassambleHelpListNear(pUVM, pCmdHlp, hDbgAs, &CurAddr, &cbCheckSymbol); … … 1486 1509 * Disassemble one instruction at cs:[r|e]ip. 1487 1510 */ 1511 if (!f64BitMode && strstr(pszRegs, " vm ")) /* a big ugly... */ 1512 return pCmdHlp->pfnExec(pCmdHlp, "uv86 %s", szDisAndRegs + 2); 1488 1513 return pCmdHlp->pfnExec(pCmdHlp, "%s", szDisAndRegs); 1489 1514 } -
trunk/src/VBox/Debugger/DBGCInternal.h
r44528 r47569 140 140 /** Current disassembler position. */ 141 141 DBGCVAR DisasmPos; 142 /** The flags that goes with DisasmPos. */ 143 uint32_t fDisasm; 142 144 /** Current source position. (flat GC) */ 143 145 DBGCVAR SourcePos; -
trunk/src/VBox/Debugger/testcase/tstDBGCStubs.cpp
r46217 r47569 380 380 } 381 381 382 VMMDECL(uint32_t) CPUMGetGuestEFlags(PVMCPU pVCpu) 383 { 384 return 2; 385 } 382 386 383 387 #include <VBox/vmm/hm.h>
Note:
See TracChangeset
for help on using the changeset viewer.