summaryrefslogtreecommitdiff
path: root/packaging/0001-ARM-Linux-Enable-DacStackWalk.patch
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/0001-ARM-Linux-Enable-DacStackWalk.patch')
-rw-r--r--packaging/0001-ARM-Linux-Enable-DacStackWalk.patch77
1 files changed, 77 insertions, 0 deletions
diff --git a/packaging/0001-ARM-Linux-Enable-DacStackWalk.patch b/packaging/0001-ARM-Linux-Enable-DacStackWalk.patch
new file mode 100644
index 0000000000..8da163cc23
--- /dev/null
+++ b/packaging/0001-ARM-Linux-Enable-DacStackWalk.patch
@@ -0,0 +1,77 @@
+From 8cd27865beb06105789cf52dc4ea472ea30da97d Mon Sep 17 00:00:00 2001
+From: Jonghyun Park <parjong@gmail.com>
+Date: Thu, 6 Jul 2017 15:42:51 +0900
+Subject: [PATCH] [ARM/Linux] Enable DacStackWalk
+
+For ARM/Linux, DacUnwindStackFrame failed to unwind stack frame due to
+the mismatch between RUNTIME_FUNCTION and IMAGE_ARM_RUNTIME_FUNCTION_ENTRY.
+
+ClrStack SOS command currently does not work due to this bug.
+
+This commit fixes this mismatch and re-enables ClrStack SOS command.
+---
+ src/unwinder/arm/unwinder_arm.cpp | 14 +++++---------
+ 1 file changed, 5 insertions(+), 9 deletions(-)
+
+diff --git a/src/unwinder/arm/unwinder_arm.cpp b/src/unwinder/arm/unwinder_arm.cpp
+index 6b1f686..6228b01 100644
+--- a/src/unwinder/arm/unwinder_arm.cpp
++++ b/src/unwinder/arm/unwinder_arm.cpp
+@@ -647,7 +647,7 @@ Return Value:
+ HRESULT
+ RtlpUnwindFunctionCompact(
+ __in ULONG ControlPcRva,
+- __in PIMAGE_ARM_RUNTIME_FUNCTION_ENTRY FunctionEntry,
++ __in PT_RUNTIME_FUNCTION FunctionEntry,
+ __inout PT_CONTEXT ContextRecord,
+ __out PULONG EstablisherFrame,
+ __deref_opt_out_opt PEXCEPTION_ROUTINE *HandlerRoutine,
+@@ -917,7 +917,7 @@ HRESULT
+ RtlpUnwindFunctionFull(
+ __in ULONG ControlPcRva,
+ __in ULONG ImageBase,
+- __in PIMAGE_ARM_RUNTIME_FUNCTION_ENTRY FunctionEntry,
++ __in PT_RUNTIME_FUNCTION FunctionEntry,
+ __inout PT_CONTEXT ContextRecord,
+ __out PULONG EstablisherFrame,
+ __deref_opt_out_opt PEXCEPTION_ROUTINE *HandlerRoutine,
+@@ -1444,7 +1444,7 @@ BOOL OOPStackUnwinderArm::Unwind(T_CONTEXT * pContext)
+ DWORD startingPc = pContext->Pc;
+ DWORD startingSp = pContext->Sp;
+
+- IMAGE_ARM_RUNTIME_FUNCTION_ENTRY Rfe;
++ T_RUNTIME_FUNCTION Rfe;
+ if (FAILED(GetFunctionEntry(DBS_EXTEND64(pContext->Pc), &Rfe, sizeof(Rfe))))
+ return FALSE;
+
+@@ -1511,17 +1511,13 @@ PEXCEPTION_ROUTINE RtlVirtualUnwind(
+ PEXCEPTION_ROUTINE handlerRoutine;
+ HRESULT res;
+
+- IMAGE_ARM_RUNTIME_FUNCTION_ENTRY rfe;
+- rfe.BeginAddress = FunctionEntry->BeginAddress;
+- rfe.UnwindData = FunctionEntry->UnwindData;
+-
+ ARM_UNWIND_PARAMS unwindParams;
+ unwindParams.ContextPointers = ContextPointers;
+
+ if ((FunctionEntry->UnwindData & 3) != 0)
+ {
+ res = RtlpUnwindFunctionCompact(ControlPc - ImageBase,
+- &rfe,
++ FunctionEntry,
+ ContextRecord,
+ EstablisherFrame,
+ &handlerRoutine,
+@@ -1533,7 +1529,7 @@ PEXCEPTION_ROUTINE RtlVirtualUnwind(
+ {
+ res = RtlpUnwindFunctionFull(ControlPc - ImageBase,
+ ImageBase,
+- &rfe,
++ FunctionEntry,
+ ContextRecord,
+ EstablisherFrame,
+ &handlerRoutine,
+--
+2.7.4
+