summaryrefslogtreecommitdiff
path: root/packaging/0010-Fix-CopyREGDISPLAY-for-WIN64EXCEPTIONS.patch
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/0010-Fix-CopyREGDISPLAY-for-WIN64EXCEPTIONS.patch')
-rw-r--r--packaging/0010-Fix-CopyREGDISPLAY-for-WIN64EXCEPTIONS.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/packaging/0010-Fix-CopyREGDISPLAY-for-WIN64EXCEPTIONS.patch b/packaging/0010-Fix-CopyREGDISPLAY-for-WIN64EXCEPTIONS.patch
new file mode 100644
index 0000000000..38d145c71a
--- /dev/null
+++ b/packaging/0010-Fix-CopyREGDISPLAY-for-WIN64EXCEPTIONS.patch
@@ -0,0 +1,48 @@
+From 33e3ecb696dd352fae67dc9a5568c903bed2a867 Mon Sep 17 00:00:00 2001
+From: Konstantin Baladurin <k.baladurin@partner.samsung.com>
+Date: Fri, 29 Sep 2017 15:42:30 +0300
+Subject: [PATCH 10/10] Fix CopyREGDISPLAY for WIN64EXCEPTIONS
+
+When WIN64EXCEPTIONS is defined, fields pCurrentContextPointers,
+pCallerContextPointers, pCurrentContext and pCallerContext of the
+REGDISPLAY are used. So we need to fix their values after coping.
+---
+ src/debug/ee/i386/debuggerregdisplayhelper.cpp | 24 ++++++++++++++++++++++++
+ 1 file changed, 24 insertions(+)
+
+diff --git a/src/debug/ee/i386/debuggerregdisplayhelper.cpp b/src/debug/ee/i386/debuggerregdisplayhelper.cpp
+index 576fdeb..86927b7 100644
+--- a/src/debug/ee/i386/debuggerregdisplayhelper.cpp
++++ b/src/debug/ee/i386/debuggerregdisplayhelper.cpp
+@@ -15,4 +15,28 @@
+ void CopyREGDISPLAY(REGDISPLAY* pDst, REGDISPLAY* pSrc)
+ {
+ *pDst = *pSrc;
++
++#ifdef WIN64EXCEPTIONS
++ if (pSrc->pCurrentContextPointers == &(pSrc->ctxPtrsOne))
++ {
++ pDst->pCurrentContextPointers = &(pDst->ctxPtrsOne);
++ pDst->pCallerContextPointers = &(pDst->ctxPtrsTwo);
++ }
++ else
++ {
++ pDst->pCurrentContextPointers = &(pDst->ctxPtrsTwo);
++ pDst->pCallerContextPointers = &(pDst->ctxPtrsOne);
++ }
++
++ if (pSrc->pCurrentContext == &(pSrc->ctxOne))
++ {
++ pDst->pCurrentContext = &(pDst->ctxOne);
++ pDst->pCallerContext = &(pDst->ctxTwo);
++ }
++ else
++ {
++ pDst->pCurrentContext = &(pDst->ctxTwo);
++ pDst->pCallerContext = &(pDst->ctxOne);
++ }
++#endif
+ }
+--
+2.7.4
+