Enable out-of-proc unwinding on ARM (#5946)
authorkvochko <a.kvochko@samsung.com>
Thu, 23 Jun 2016 16:23:20 +0000 (20:23 +0400)
committerJan Vorlicek <janvorli@microsoft.com>
Thu, 23 Jun 2016 16:23:20 +0000 (18:23 +0200)
Fix #5855

src/vm/arm/stubs.cpp
src/vm/arm64/stubs.cpp

index c3064bf..9868cb6 100644 (file)
@@ -537,10 +537,17 @@ void LazyMachState::unwindLazyState(LazyMachState* baseState,
 #ifndef FEATURE_PAL
         pvControlPc = Thread::VirtualUnwindCallFrame(&ctx, &nonVolRegPtrs);
 #else // !FEATURE_PAL
+#ifdef DACCESS_COMPILE
+        HRESULT hr = DacVirtualUnwind(threadId, &ctx, &nonVolRegPtrs);
+        if (FAILED(hr))
+        {
+            DacError(hr);
+        }
+#else // DACCESS_COMPILE
         PAL_VirtualUnwind(&ctx, &nonVolRegPtrs);
+#endif // DACCESS_COMPILE
         pvControlPc = GetIP(&ctx);
 #endif // !FEATURE_PAL
-
         if (funCallDepth > 0)
         {
             --funCallDepth;
index a3512a8..bb2a6cf 100644 (file)
@@ -322,10 +322,18 @@ void LazyMachState::unwindLazyState(LazyMachState* baseState,
 
 #ifndef FEATURE_PAL
         pvControlPc = Thread::VirtualUnwindCallFrame(&context, &nonVolContextPtrs);
-#else
-        PAL_VirtualUnwind(&context, &nonVolContextPtrs);
+#else // !FEATURE_PAL
+#ifdef DACCESS_COMPILE
+        HRESULT hr = DacVirtualUnwind(threadId, &context, &nonVolContextPtrs);
+        if (FAILED(hr))
+        {
+            DacError(hr);
+        }
+#else // DACCESS_COMPILE
+        PAL_VirtualUnwind(&context, &nonVolContextPtrs);  
+#endif // DACCESS_COMPILE
         pvControlPc = GetIP(&context);
-#endif
+#endif // !FEATURE_PAL
 
         if (funCallDepth > 0)
         {