[x86/Linux] Set ResumeEsp as Caller Sp when unwond to native frame (dotnet/coreclr...
authorJonghyun Park <parjong@gmail.com>
Mon, 10 Apr 2017 13:21:11 +0000 (22:21 +0900)
committerJan Vorlicek <janvorli@microsoft.com>
Mon, 10 Apr 2017 13:21:11 +0000 (15:21 +0200)
Commit migrated from https://github.com/dotnet/coreclr/commit/ed3cf951911d56a4315280253c2056a753c62061

src/coreclr/src/unwinder/i386/unwinder_i386.cpp

index 5ce6e16..55f0766 100644 (file)
@@ -117,7 +117,9 @@ OOPStackUnwinderX86::VirtualUnwind(
 #endif // UNIX_X86_ABI
 
     ContextRecord->Esp = rd.SP - paramSize;
-    ContextRecord->ResumeEsp = rd.SP + paddingSize;
+    ContextRecord->ResumeEsp = ExecutionManager::IsManagedCode((PCODE) rd.ControlPC)
+                             ? rd.SP + paddingSize
+                             : ContextRecord->Esp;
     ContextRecord->Eip = rd.ControlPC;
 
     // For x86, the value of Establisher Frame Pointer is Caller SP