diff options
author | Konstantin Baladurin <k.baladurin@partner.samsung.com> | 2017-09-29 20:15:35 +0300 |
---|---|---|
committer | Jan Vorlicek <janvorli@microsoft.com> | 2017-09-29 19:15:35 +0200 |
commit | 2eed20ce511fa25085742d4aaffc29a3939e84dd (patch) | |
tree | 76e273a6d597efe9894c289ec84fce5bb29d7f84 /src/debug | |
parent | c8a49ac3abce30092f51e397136098f9cdd9ba5f (diff) | |
download | coreclr-2eed20ce511fa25085742d4aaffc29a3939e84dd.tar.gz coreclr-2eed20ce511fa25085742d4aaffc29a3939e84dd.tar.bz2 coreclr-2eed20ce511fa25085742d4aaffc29a3939e84dd.zip |
[x86/Linux] Fix CopyREGDISPLAY for WIN64EXCEPTIONS (#14254)
When WIN64EXCEPTIONS is defined, fields pCurrentContextPointers,
pCallerContextPointers, pCurrentContext and pCallerContext of the
REGDISPLAY are used. So we need to fix their values after coping.
Diffstat (limited to 'src/debug')
-rw-r--r-- | src/debug/ee/i386/debuggerregdisplayhelper.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/debug/ee/i386/debuggerregdisplayhelper.cpp b/src/debug/ee/i386/debuggerregdisplayhelper.cpp index 576fdeb592..86927b757e 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 } |