diff options
Diffstat (limited to 'src/debug/ee/amd64/debuggerregdisplayhelper.cpp')
-rw-r--r-- | src/debug/ee/amd64/debuggerregdisplayhelper.cpp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/debug/ee/amd64/debuggerregdisplayhelper.cpp b/src/debug/ee/amd64/debuggerregdisplayhelper.cpp new file mode 100644 index 0000000000..0d48a67eea --- /dev/null +++ b/src/debug/ee/amd64/debuggerregdisplayhelper.cpp @@ -0,0 +1,41 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. +/* ------------------------------------------------------------------------- * + * DebuggerRegDisplayHelper.cpp -- implementation of the platform-dependent +// + + * methods for transferring information between + * REGDISPLAY and DebuggerREGDISPLAY + * ------------------------------------------------------------------------- */ + +#include "stdafx.h" + +void CopyREGDISPLAY(REGDISPLAY* pDst, REGDISPLAY* pSrc) +{ + memcpy((BYTE*)pDst, (BYTE*)pSrc, sizeof(REGDISPLAY)); + + pDst->pContext = pSrc->pContext; + + 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); + } +} |