Changeset 75240 in vbox for trunk/src/VBox
- Timestamp:
- Nov 3, 2018 2:56:41 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/DBGFStack.cpp
r73495 r75240 543 543 else if (pFrame->enmReturnType == RTDBGRETURNTYPE_NEAR32) 544 544 { 545 #if 1 546 /* Assumes returning 32-bit code. */ 545 547 pFrame->fFlags |= DBGFSTACKFRAME_FLAGS_USED_ODD_EVEN; 546 548 pFrame->enmReturnType = RTDBGRETURNTYPE_FAR32; 547 549 cbRetAddr = 8; 550 #else 551 /* Assumes returning 16-bit code. */ 552 pFrame->fFlags |= DBGFSTACKFRAME_FLAGS_USED_ODD_EVEN; 553 pFrame->enmReturnType = RTDBGRETURNTYPE_FAR16; 554 cbRetAddr = 4; 555 #endif 548 556 } 549 557 } … … 610 618 } 611 619 else 620 { 621 int rc2; 612 622 switch (pFrame->enmReturnType) 613 623 { … … 640 650 break; 641 651 case RTDBGRETURNTYPE_FAR16: 642 DBGFR3AddrFromSelOff(pUnwindCtx->m_pUVM, pUnwindCtx->m_idCpu, &pFrame->AddrReturnPC, uRet.pu16[1], uRet.pu16[0]); 652 rc2 = DBGFR3AddrFromSelOff(pUnwindCtx->m_pUVM, pUnwindCtx->m_idCpu, &pFrame->AddrReturnPC, uRet.pu16[1], uRet.pu16[0]); 653 if (RT_SUCCESS(rc2)) 654 break; 655 rc2 = DBGFR3AddrFromSelOff(pUnwindCtx->m_pUVM, pUnwindCtx->m_idCpu, &pFrame->AddrReturnPC, pFrame->AddrPC.Sel, uRet.pu16[0]); 656 if (RT_SUCCESS(rc2)) 657 pFrame->enmReturnType = RTDBGRETURNTYPE_NEAR16; 658 else 659 DBGFR3AddrFromSelOff(pUnwindCtx->m_pUVM, pUnwindCtx->m_idCpu, &pFrame->AddrReturnPC, uRet.pu16[1], uRet.pu16[0]); 643 660 break; 644 661 case RTDBGRETURNTYPE_FAR32: 645 DBGFR3AddrFromSelOff(pUnwindCtx->m_pUVM, pUnwindCtx->m_idCpu, &pFrame->AddrReturnPC, uRet.pu16[2], uRet.pu32[0]); 662 rc2 = DBGFR3AddrFromSelOff(pUnwindCtx->m_pUVM, pUnwindCtx->m_idCpu, &pFrame->AddrReturnPC, uRet.pu16[2], uRet.pu32[0]); 663 if (RT_SUCCESS(rc2)) 664 break; 665 rc2 = DBGFR3AddrFromSelOff(pUnwindCtx->m_pUVM, pUnwindCtx->m_idCpu, &pFrame->AddrReturnPC, pFrame->AddrPC.Sel, uRet.pu32[0]); 666 if (RT_SUCCESS(rc2)) 667 pFrame->enmReturnType = RTDBGRETURNTYPE_NEAR32; 668 else 669 DBGFR3AddrFromSelOff(pUnwindCtx->m_pUVM, pUnwindCtx->m_idCpu, &pFrame->AddrReturnPC, uRet.pu16[2], uRet.pu32[0]); 646 670 break; 647 671 case RTDBGRETURNTYPE_FAR64: … … 667 691 return VERR_INVALID_PARAMETER; 668 692 } 693 } 669 694 670 695 … … 726 751 { 727 752 dbgfR3UnwindCtxSetPcAndSp(pUnwindCtx, &pFrame->AddrReturnPC, &pFrame->AddrReturnStack); 753 pUnwindCtx->m_State.u.x86.auRegs[X86_GREG_xBP] = pFrame->AddrReturnFrame.off; 728 754 } 729 755 /** @todo Reevaluate CS if the previous frame return type isn't near. */
Note:
See TracChangeset
for help on using the changeset viewer.