summaryrefslogtreecommitdiff
path: root/packaging/0002-Merge-pull-request-13944-from-ayuckhulk-fix-arm-set-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/0002-Merge-pull-request-13944-from-ayuckhulk-fix-arm-set-.patch')
-rw-r--r--packaging/0002-Merge-pull-request-13944-from-ayuckhulk-fix-arm-set-.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/packaging/0002-Merge-pull-request-13944-from-ayuckhulk-fix-arm-set-.patch b/packaging/0002-Merge-pull-request-13944-from-ayuckhulk-fix-arm-set-.patch
new file mode 100644
index 0000000000..299dd44504
--- /dev/null
+++ b/packaging/0002-Merge-pull-request-13944-from-ayuckhulk-fix-arm-set-.patch
@@ -0,0 +1,35 @@
+From e42ba780f56c26a5e4ec35a1070d3313f0c45998 Mon Sep 17 00:00:00 2001
+From: Bruce Forstall <brucefo@microsoft.com>
+Date: Fri, 15 Sep 2017 10:25:01 -0700
+Subject: [PATCH 2/5] Merge pull request #13944 from
+ ayuckhulk/fix-arm-set-debuggerregdisplay-from-context
+
+[ARM] Fix SetDebuggerREGDISPLAYFromREGDISPLAY() function
+---
+ src/debug/shared/arm/primitives.cpp | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/src/debug/shared/arm/primitives.cpp b/src/debug/shared/arm/primitives.cpp
+index e9d0bbd..8771dd9 100644
+--- a/src/debug/shared/arm/primitives.cpp
++++ b/src/debug/shared/arm/primitives.cpp
+@@ -80,8 +80,15 @@ void CORDbgSetDebuggerREGDISPLAYFromContext(DebuggerREGDISPLAY *pDRD,
+ void SetDebuggerREGDISPLAYFromREGDISPLAY(DebuggerREGDISPLAY* pDRD, REGDISPLAY* pRD)
+ {
+ SUPPORTS_DAC_HOST_ONLY;
+-
++ // CORDbgSetDebuggerREGDISPLAYFromContext() checks the context flags. In cases where we don't have a filter
++ // context from the thread, we initialize a CONTEXT on the stack and use that to do our stack walking. We never
++ // initialize the context flags in such cases. Since this function is called from the stackwalker, we can
++ // guarantee that the integer, control, and floating point sections are valid. So we set the flags here and
++ // restore them afterwards.
++ DWORD contextFlags = pRD->pCurrentContext->ContextFlags;
++ pRD->pCurrentContext->ContextFlags = CONTEXT_FULL;
+ CORDbgSetDebuggerREGDISPLAYFromContext(pDRD, reinterpret_cast<DT_CONTEXT*>(pRD->pCurrentContext));
++ pRD->pCurrentContext->ContextFlags = contextFlags;
+
+ pDRD->SP = pRD->SP;
+ pDRD->PC = (SIZE_T)*(pRD->pPC);
+--
+2.7.4
+