diff options
author | Jonghyun Park <parjong@gmail.com> | 2017-01-20 19:33:06 +0900 |
---|---|---|
committer | Jan Vorlicek <janvorli@microsoft.com> | 2017-01-20 11:33:06 +0100 |
commit | 9743c40692687d6ad0bb43046d88b3bbf021f3f2 (patch) | |
tree | a7a8f406f9983a0877bcf7cdab352caa64e204dd /src | |
parent | 6f31c983e6202541f881c1cfe3ef597447ef7912 (diff) | |
download | coreclr-9743c40692687d6ad0bb43046d88b3bbf021f3f2.tar.gz coreclr-9743c40692687d6ad0bb43046d88b3bbf021f3f2.tar.bz2 coreclr-9743c40692687d6ad0bb43046d88b3bbf021f3f2.zip |
[x86/Linux] Port 'TransitionFrame::UpdateRegDisplay' (#8964)
* [x86/Linux] Port 'TransitionFrame::UpdateRegDisplay'
* Use different ControlPC/Esp values for WIN64EXCEPTIONS
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; } |