summaryrefslogtreecommitdiff
path: root/src/unwinder
diff options
context:
space:
mode:
authorJonghyun Park <parjong@gmail.com>2017-02-17 18:19:16 +0900
committerJan Vorlicek <janvorli@microsoft.com>2017-02-17 10:19:16 +0100
commit00fc8f9f212bc00eda9c94707b50e278d9b8d7c4 (patch)
treec28efb3b009e5302ec645424d4a7228bae1dbbce /src/unwinder
parentc75fee493ec0eb8b4ac57ac3ff69281531218386 (diff)
downloadcoreclr-00fc8f9f212bc00eda9c94707b50e278d9b8d7c4.tar.gz
coreclr-00fc8f9f212bc00eda9c94707b50e278d9b8d7c4.tar.bz2
coreclr-00fc8f9f212bc00eda9c94707b50e278d9b8d7c4.zip
[x86/Linux] Fix GetCallerSp (#9384)
* [x86/Linux] Fix GetCallerSp * Do NOT pop stack argument for TransitionFrame * Add ResumeEsp to CONTEXT
Diffstat (limited to 'src/unwinder')
-rw-r--r--src/unwinder/i386/unwinder_i386.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/unwinder/i386/unwinder_i386.cpp b/src/unwinder/i386/unwinder_i386.cpp
index ca9e28e44a..4de23790e6 100644
--- a/src/unwinder/i386/unwinder_i386.cpp
+++ b/src/unwinder/i386/unwinder_i386.cpp
@@ -76,6 +76,7 @@ OOPStackUnwinderX86::VirtualUnwind(
FillRegDisplay(&rd, ContextRecord);
+ rd.SP = ContextRecord->ResumeEsp;
rd.PCTAddr = (UINT_PTR)&(ContextRecord->Eip);
if (ContextPointers)
@@ -104,7 +105,8 @@ OOPStackUnwinderX86::VirtualUnwind(
ENUM_CALLEE_SAVED_REGISTERS();
#undef CALLEE_SAVED_REGISTER
- ContextRecord->Esp = rd.SP;
+ ContextRecord->Esp = rd.SP - codeInfo.GetCodeManager()->GetStackParameterSize(&codeInfo);
+ ContextRecord->ResumeEsp = rd.SP;
ContextRecord->Eip = rd.ControlPC;
// For x86, the value of Establisher Frame Pointer is Caller SP