summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJonghyun Park <parjong@gmail.com>2017-01-20 19:33:06 +0900
committerJan Vorlicek <janvorli@microsoft.com>2017-01-20 11:33:06 +0100
commit9743c40692687d6ad0bb43046d88b3bbf021f3f2 (patch)
treea7a8f406f9983a0877bcf7cdab352caa64e204dd /src
parent6f31c983e6202541f881c1cfe3ef597447ef7912 (diff)
downloadcoreclr-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.cpp27
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*)&regs->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;
}