summaryrefslogtreecommitdiff
path: root/src/unwinder
diff options
context:
space:
mode:
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