diff options
author | Bruce Forstall <brucefo@microsoft.com> | 2017-09-15 10:25:01 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-15 10:25:01 -0700 |
commit | 19fc1cdcf46f971aff72387af06019a8740b30ed (patch) | |
tree | 4fba2f49fa38f7d5694ef19d5b6710fa4151cf1c /src/debug | |
parent | 52098963e7bc7cc280ebccf3c20df5e2aa15d3c8 (diff) | |
parent | ed63a9873f5228fcc2b9b0280a9a237a3401aa05 (diff) | |
download | coreclr-19fc1cdcf46f971aff72387af06019a8740b30ed.tar.gz coreclr-19fc1cdcf46f971aff72387af06019a8740b30ed.tar.bz2 coreclr-19fc1cdcf46f971aff72387af06019a8740b30ed.zip |
Merge pull request #13944 from ayuckhulk/fix-arm-set-debuggerregdisplay-from-context
[ARM] Fix SetDebuggerREGDISPLAYFromREGDISPLAY() function
Diffstat (limited to 'src/debug')
-rw-r--r-- | src/debug/shared/arm/primitives.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/debug/shared/arm/primitives.cpp b/src/debug/shared/arm/primitives.cpp index e9d0bbd59b..8771dd946d 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); |