- Timestamp:
- Jan 11, 2017 12:52:23 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/VMMGuruMeditation.cpp
r64857 r65242 37 37 #include <VBox/vmm/hm.h> 38 38 #include <iprt/assert.h> 39 #include <iprt/dbg.h> 39 40 #include <iprt/time.h> 40 41 #include <iprt/stream.h> … … 472 473 } 473 474 475 /* Symbols on the stack. */ 476 #ifdef VMM_R0_SWITCH_STACK 477 uint32_t const iLast = VMM_STACK_SIZE / sizeof(uintptr_t); 478 uint32_t iAddr = (uint32_t)( pVCpu->vmm.s.CallRing3JmpBufR0.SavedEsp 479 - MMHyperCCToR0(pVM, pVCpu->vmm.s.pbEMTStackR3) / sizeof(uintptr_t); 480 if (iAddr > iLast) 481 iAddr = 0; 482 #else 483 uint32_t const iLast = RT_MIN(pVCpu->vmm.s.CallRing3JmpBufR0.cbSavedStack, VMM_STACK_SIZE) 484 / sizeof(uintptr_t); 485 uint32_t iAddr = 0; 486 #endif 487 pHlp->pfnPrintf(pHlp, 488 "!!\n" 489 "!!\n" 490 "!! Addresses on the stack (iAddr=%#x, iLast=%#x)\n" 491 "!!\n", 492 iAddr, iLast); 493 uintptr_t const *paAddr = (uintptr_t const *)pVCpu->vmm.s.pbEMTStackR3; 494 while (iAddr < iLast) 495 { 496 uintptr_t const uAddr = paAddr[iAddr]; 497 if (uAddr > X86_PAGE_SIZE) 498 { 499 DBGFADDRESS Addr; 500 DBGFR3AddrFromFlat(pVM->pUVM, &Addr, uAddr); 501 RTGCINTPTR offDisp = 0; 502 PRTDBGSYMBOL pSym = DBGFR3AsSymbolByAddrA(pVM->pUVM, DBGF_AS_R0, &Addr, 503 RTDBGSYMADDR_FLAGS_LESS_OR_EQUAL, &offDisp, NULL); 504 RTGCINTPTR offLineDisp; 505 PRTDBGLINE pLine = DBGFR3AsLineByAddrA(pVM->pUVM, DBGF_AS_R0, &Addr, &offLineDisp, NULL); 506 if (pLine || pSym) 507 { 508 pHlp->pfnPrintf(pHlp, "%#06x: %p =>", iAddr * sizeof(uintptr_t), uAddr); 509 if (pSym) 510 pHlp->pfnPrintf(pHlp, " %s + %#x", pSym->szName, (intptr_t)offDisp); 511 if (pLine) 512 pHlp->pfnPrintf(pHlp, " [%s:%u + %#x]\n", pLine->szFilename, pLine->uLineNo, offLineDisp); 513 else 514 pHlp->pfnPrintf(pHlp, "\n"); 515 RTDbgSymbolFree(pSym); 516 RTDbgLineFree(pLine); 517 } 518 } 519 iAddr++; 520 } 521 474 522 /* raw stack */ 475 523 Hlp.fRecSummary = false; 476 524 pHlp->pfnPrintf(pHlp, 477 525 "!!\n" 478 "!! Raw stack (mind the direction). 526 "!! Raw stack (mind the direction).\n" 479 527 "!! pbEMTStackR0=%RHv pbEMTStackBottomR0=%RHv VMM_STACK_SIZE=%#x\n" 480 528 "!! pbEmtStackR3=%p\n"
Note:
See TracChangeset
for help on using the changeset viewer.