diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/vm/i386/cgenx86.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/vm/i386/cgenx86.cpp b/src/vm/i386/cgenx86.cpp index d721e3b61f..6afd58b7db 100644 --- a/src/vm/i386/cgenx86.cpp +++ b/src/vm/i386/cgenx86.cpp @@ -275,6 +275,8 @@ void TransitionFrame::UpdateRegDisplay(const PREGDISPLAY pRD) _ASSERTE(pFunc != NULL); UpdateRegDisplayHelper(pRD, pFunc->CbStackPop()); + LOG((LF_GCROOTS, LL_INFO100000, "STACKWALK TransitionFrame::UpdateRegDisplay(ip:%p, sp:%p)\n", pRD->ControlPC, pRD->Esp)); + RETURN; } @@ -300,9 +302,34 @@ void TransitionFrame::UpdateRegDisplayHelper(const PREGDISPLAY pRD, UINT cbStack ENUM_CALLEE_SAVED_REGISTERS(); #undef CALLEE_SAVED_REGISTER pRD->PCTAddr = GetReturnAddressPtr(); + +#ifdef WIN64EXCEPTIONS + + pRD->IsCallerContextValid = FALSE; + pRD->IsCallerSPValid = FALSE; + + pRD->pCurrentContext->Eip = *PTR_PCODE(pRD->PCTAddr);; + pRD->pCurrentContext->Esp = GetSP(); + + T_CONTEXT * pContext = pRD->pCurrentContext; +#define CALLEE_SAVED_REGISTER(regname) pContext->regname = regs->regname; + ENUM_CALLEE_SAVED_REGISTERS(); +#undef CALLEE_SAVED_REGISTER + + KNONVOLATILE_CONTEXT_POINTERS * pContextPointers = pRD->pCurrentContextPointers; +#define CALLEE_SAVED_REGISTER(regname) pContextPointers->regname = (DWORD*)®s->regname; + ENUM_CALLEE_SAVED_REGISTERS(); +#undef CALLEE_SAVED_REGISTER + + SyncRegDisplayToCurrentContext(pRD); + +#else // WIN64EXCEPTIONS + pRD->ControlPC = *PTR_PCODE(pRD->PCTAddr); pRD->Esp = (DWORD)(pRD->PCTAddr + sizeof(TADDR) + cbStackPop); +#endif // WIN64EXCEPTIONS + RETURN; } |