Changeset 46155 in vbox for trunk/src/VBox/VMM
- Timestamp:
- May 18, 2013 12:30:13 AM (12 years ago)
- Location:
- trunk/src/VBox/VMM/VMMR3
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/DBGF.cpp
r45701 r46155 963 963 964 964 /* 965 * Check if attached. 965 * Validate input. The UVM handle shall be valid, the VM handle might be 966 * in the processes of being destroyed already, so deal quietly with that. 966 967 */ 967 968 UVM_ASSERT_VALID_EXT_RETURN(pUVM, VERR_INVALID_VM_HANDLE); 968 969 PVM pVM = pUVM->pVM; 969 VM_ASSERT_VALID_EXT_RETURN(pVM, VERR_INVALID_VM_HANDLE); 970 if (!VM_IS_VALID_EXT(pVM)) 971 return VERR_INVALID_VM_HANDLE; 972 973 /* 974 * Check if attached. 975 */ 970 976 AssertReturn(pVM->dbgf.s.fAttached, VERR_DBGF_NOT_ATTACHED); 971 977 -
trunk/src/VBox/VMM/VMMR3/DBGFAddr.cpp
r45753 r46155 116 116 DBGFSELINFO SelInfo; 117 117 int rc = DBGFR3SelQueryInfo(pUVM, idCpu, Sel, DBGFSELQI_FLAGS_DT_GUEST | DBGFSELQI_FLAGS_DT_ADJ_64BIT_MODE, &SelInfo); 118 if (RT_FAILURE(rc) && !HMIsEnabled(pUVM->pVM)) 119 rc = DBGFR3SelQueryInfo(pUVM, idCpu, Sel, DBGFSELQI_FLAGS_DT_SHADOW, &SelInfo); 118 120 if (RT_FAILURE(rc)) 119 121 return rc; … … 121 123 if (RT_FAILURE(rc)) 122 124 return rc; 125 if ( (SelInfo.fFlags & DBGFSELINFO_FLAGS_HYPER) 126 || dbgfR3IsHMA(pUVM, pAddress->FlatPtr)) 127 pAddress->fFlags |= DBGFADDRESS_FLAGS_HMA; 123 128 } 124 129 else … … 126 131 pAddress->FlatPtr = off; 127 132 pAddress->fFlags = DBGFADDRESS_FLAGS_FLAT; 133 if (dbgfR3IsHMA(pUVM, pAddress->FlatPtr)) 134 pAddress->fFlags |= DBGFADDRESS_FLAGS_HMA; 128 135 } 129 136 pAddress->fFlags |= DBGFADDRESS_FLAGS_VALID; 130 if (dbgfR3IsHMA(pUVM, pAddress->FlatPtr))131 pAddress->fFlags |= DBGFADDRESS_FLAGS_HMA;132 137 133 138 return VINF_SUCCESS; -
trunk/src/VBox/VMM/VMMR3/DBGFAddrSpace.cpp
r46137 r46155 1088 1088 * @param hDbgAs The address space handle. 1089 1089 * @param pAddress The address to lookup. 1090 * @param fFlags One of the RTDBGSYMADDR_FLAGS_XXX flags. 1090 1091 * @param poffDisp Where to return the distance between the returned 1091 1092 * symbol and pAddress. Optional. … … 1095 1096 * @param phMod Where to return the module handle. Optional. 1096 1097 */ 1097 VMMR3DECL(int) DBGFR3AsSymbolByAddr(PUVM pUVM, RTDBGAS hDbgAs, PCDBGFADDRESS pAddress, 1098 VMMR3DECL(int) DBGFR3AsSymbolByAddr(PUVM pUVM, RTDBGAS hDbgAs, PCDBGFADDRESS pAddress, uint32_t fFlags, 1098 1099 PRTGCINTPTR poffDisp, PRTDBGSYMBOL pSymbol, PRTDBGMOD phMod) 1099 1100 { … … 1103 1104 if (hDbgAs == DBGF_AS_RC_AND_GC_GLOBAL) 1104 1105 { 1105 int rc = DBGFR3AsSymbolByAddr(pUVM, DBGF_AS_RC, pAddress, poffDisp, pSymbol, phMod);1106 int rc = DBGFR3AsSymbolByAddr(pUVM, DBGF_AS_RC, pAddress, fFlags, poffDisp, pSymbol, phMod); 1106 1107 if (RT_FAILURE(rc)) 1107 rc = DBGFR3AsSymbolByAddr(pUVM, DBGF_AS_GLOBAL, pAddress, poffDisp, pSymbol, phMod);1108 rc = DBGFR3AsSymbolByAddr(pUVM, DBGF_AS_GLOBAL, pAddress, fFlags, poffDisp, pSymbol, phMod); 1108 1109 return rc; 1109 1110 } … … 1129 1130 */ 1130 1131 RTDBGMOD hMod; 1131 int rc = RTDbgAsSymbolByAddr(hRealAS, pAddress->FlatPtr, RTDBGSYMADDR_FLAGS_LESS_OR_EQUAL, poffDisp, pSymbol, &hMod);1132 int rc = RTDbgAsSymbolByAddr(hRealAS, pAddress->FlatPtr, fFlags, poffDisp, pSymbol, &hMod); 1132 1133 if (RT_SUCCESS(rc)) 1133 1134 { … … 1188 1189 * @param hDbgAs See DBGFR3AsSymbolByAddr. 1189 1190 * @param pAddress See DBGFR3AsSymbolByAddr. 1191 * @param fFlags See DBGFR3AsSymbolByAddr. 1190 1192 * @param poffDisp See DBGFR3AsSymbolByAddr. 1191 1193 * @param phMod See DBGFR3AsSymbolByAddr. 1192 1194 */ 1193 VMMR3DECL(PRTDBGSYMBOL) DBGFR3AsSymbolByAddrA(PUVM pUVM, RTDBGAS hDbgAs, PCDBGFADDRESS pAddress, PRTGCINTPTR poffDisp, PRTDBGMOD phMod) 1195 VMMR3DECL(PRTDBGSYMBOL) DBGFR3AsSymbolByAddrA(PUVM pUVM, RTDBGAS hDbgAs, PCDBGFADDRESS pAddress, uint32_t fFlags, 1196 PRTGCINTPTR poffDisp, PRTDBGMOD phMod) 1194 1197 { 1195 1198 RTDBGSYMBOL SymInfo; 1196 int rc = DBGFR3AsSymbolByAddr(pUVM, hDbgAs, pAddress, poffDisp, &SymInfo, phMod);1199 int rc = DBGFR3AsSymbolByAddr(pUVM, hDbgAs, pAddress, fFlags, poffDisp, &SymInfo, phMod); 1197 1200 if (RT_SUCCESS(rc)) 1198 1201 return RTDbgSymbolDup(&SymInfo); -
trunk/src/VBox/VMM/VMMR3/DBGFDisas.cpp
r45753 r46155 301 301 rc = DBGFR3AddrFromSelInfoOff(pState->pVM->pUVM, &Addr, pSelInfo, uAddress); 302 302 if (RT_SUCCESS(rc)) 303 rc = DBGFR3AsSymbolByAddr(pState->pVM->pUVM, pState->hAs, &Addr, &off, &Sym, NULL /*phMod*/); 303 rc = DBGFR3AsSymbolByAddr(pState->pVM->pUVM, pState->hAs, &Addr, RTDBGSYMADDR_FLAGS_LESS_OR_EQUAL, 304 &off, &Sym, NULL /*phMod*/); 304 305 } 305 306 else … … 359 360 else if (fFlags & DBGF_DISAS_FLAGS_CURRENT_HYPER) 360 361 { 362 fFlags |= DBGF_DISAS_FLAGS_HYPER; 361 363 pCtxCore = CPUMGetHyperCtxCore(pVCpu); 362 364 Sel = pCtxCore->cs.Sel; … … 449 451 } 450 452 } 451 else if ( !(fFlags & DBGF_DISAS_FLAGS_ CURRENT_HYPER)453 else if ( !(fFlags & DBGF_DISAS_FLAGS_HYPER) 452 454 && ( (pCtxCore && pCtxCore->eflags.Bits.u1VM) 453 455 || enmMode == PGMMODE_REAL … … 474 476 else 475 477 { 476 rc = SELMR3GetSelectorInfo(pVM, pVCpu, Sel, &SelInfo); 478 if (!(fFlags & DBGF_DISAS_FLAGS_HYPER)) 479 rc = SELMR3GetSelectorInfo(pVM, pVCpu, Sel, &SelInfo); 480 else 481 rc = SELMR3GetShadowSelectorInfo(pVM, Sel, &SelInfo); 477 482 if (RT_FAILURE(rc)) 478 483 { -
trunk/src/VBox/VMM/VMMR3/DBGFReg.cpp
r44691 r46155 1293 1293 * Resolve the register. 1294 1294 */ 1295 bool const fGuestRegs = !(idDefCpu & DBGFREG_HYPER_VMCPUID) && idDefCpu != VMCPUID_ANY; 1295 bool fGuestRegs = true; 1296 if ((idDefCpu & DBGFREG_HYPER_VMCPUID) && idDefCpu != VMCPUID_ANY) 1297 { 1298 fGuestRegs = false; 1299 idDefCpu &= ~DBGFREG_HYPER_VMCPUID; 1300 } 1301 1296 1302 PCDBGFREGLOOKUP pLookupRec = dbgfR3RegResolve(pUVM, idDefCpu, pszReg, fGuestRegs); 1297 1303 if (!pLookupRec) … … 1448 1454 * Resolve the register and call the getter on the relevant CPU. 1449 1455 */ 1450 bool const fGuestRegs = !(idDefCpu & DBGFREG_HYPER_VMCPUID) && idDefCpu != VMCPUID_ANY; 1456 bool fGuestRegs = true; 1457 if ((idDefCpu & DBGFREG_HYPER_VMCPUID) && idDefCpu != VMCPUID_ANY) 1458 { 1459 fGuestRegs = false; 1460 idDefCpu &= ~DBGFREG_HYPER_VMCPUID; 1461 } 1451 1462 PCDBGFREGLOOKUP pLookupRec = dbgfR3RegResolve(pUVM, idDefCpu, pszReg, fGuestRegs); 1452 1463 if (pLookupRec) -
trunk/src/VBox/VMM/VMMR3/DBGFStack.cpp
r44528 r46155 157 157 if (DBGFADDRESS_IS_VALID(&pFrame->AddrPC)) 158 158 { 159 pFrame->pSymPC = DBGFR3AsSymbolByAddrA(pUVM, hAs, &pFrame->AddrPC, NULL /*offDisp*/, NULL /*phMod*/); 159 pFrame->pSymPC = DBGFR3AsSymbolByAddrA(pUVM, hAs, &pFrame->AddrPC, RTDBGSYMADDR_FLAGS_LESS_OR_EQUAL, 160 NULL /*offDisp*/, NULL /*phMod*/); 160 161 pFrame->pLinePC = DBGFR3LineByAddrAlloc(pUVM, pFrame->AddrPC.FlatPtr, NULL); 161 162 } … … 253 254 } 254 255 255 pFrame->pSymReturnPC = DBGFR3AsSymbolByAddrA(pUVM, hAs, &pFrame->AddrReturnPC, NULL /*offDisp*/, NULL /*phMod*/); 256 pFrame->pSymReturnPC = DBGFR3AsSymbolByAddrA(pUVM, hAs, &pFrame->AddrReturnPC, RTDBGSYMADDR_FLAGS_LESS_OR_EQUAL, 257 NULL /*offDisp*/, NULL /*phMod*/); 256 258 pFrame->pLineReturnPC = DBGFR3LineByAddrAlloc(pUVM, pFrame->AddrReturnPC.FlatPtr, NULL); 257 259 -
trunk/src/VBox/VMM/VMMR3/EM.cpp
r45858 r46155 2404 2404 if (rc != VINF_SUCCESS) 2405 2405 { 2406 /* switch to guru meditation mode */ 2407 pVCpu->em.s.enmState = EMSTATE_GURU_MEDITATION; 2408 VMMR3FatalDump(pVM, pVCpu, rc); 2406 if (rc == VINF_EM_OFF || rc == VINF_EM_TERMINATE) 2407 pVCpu->em.s.enmState = EMSTATE_TERMINATING; 2408 else 2409 { 2410 /* switch to guru meditation mode */ 2411 pVCpu->em.s.enmState = EMSTATE_GURU_MEDITATION; 2412 VMMR3FatalDump(pVM, pVCpu, rc); 2413 } 2409 2414 Log(("EMR3ExecuteVM: actually returns %Rrc (state %s / %s)\n", rc, emR3GetStateName(pVCpu->em.s.enmState), emR3GetStateName(enmOldState))); 2410 2415 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.