Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
Revise regdisp.h
Browse files Browse the repository at this point in the history
  • Loading branch information
parjong committed Dec 15, 2016
1 parent 86a6831 commit cc26828
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/inc/regdisp.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Thread;
#endif // DEBUG_REGDISPLAY


#if defined(_TARGET_X86_)
#if defined(_TARGET_X86_) && !defined(WIN64EXCEPTIONS)

struct REGDISPLAY {
PCONTEXT pContext; // points to current Context; either
Expand Down Expand Up @@ -79,7 +79,7 @@ inline TADDR GetRegdisplayStackMark(REGDISPLAY *display) {
return display->PCTAddr;
}

#elif defined(_WIN64)
#elif defined(WIN64EXCEPTIONS)

#if defined(_TARGET_ARM64_)
typedef struct _Arm64VolatileContextPointer
Expand Down Expand Up @@ -368,7 +368,7 @@ inline void FillRegDisplay(const PREGDISPLAY pRD, PT_CONTEXT pctx, PT_CONTEXT pC

SUPPORTS_DAC;

#ifdef _TARGET_X86_
#if defined(_TARGET_X86_) && !defined(WIN64EXCEPTIONS)
pRD->pContext = pctx;
pRD->pContextForUnwind = NULL;
pRD->pEdi = &(pctx->Edi);
Expand All @@ -381,7 +381,7 @@ inline void FillRegDisplay(const PREGDISPLAY pRD, PT_CONTEXT pctx, PT_CONTEXT pC
pRD->Esp = pctx->Esp;
pRD->ControlPC = (PCODE)(pctx->Eip);
pRD->PCTAddr = (UINT_PTR)&(pctx->Eip);
#elif defined(_WIN64)
#elif defined(WIN64EXCEPTIONS)
pRD->pContext = pctx;
#ifdef _TARGET_AMD64_
for (int i = 0; i < 16; i++)
Expand Down Expand Up @@ -479,7 +479,7 @@ inline void CopyRegDisplay(const PREGDISPLAY pInRD, PREGDISPLAY pOutRD, T_CONTEX

T_CONTEXT* pOutCallerCtx = NULL;

#ifdef _TARGET_X86_
#if defined(_TARGET_X86_) && !defined(WIN64EXCEPTIONS)
if (pInRD->pEdi != NULL) {pOutCtx->Edi = *pInRD->pEdi;} else {pInRD->pEdi = NULL;}
if (pInRD->pEsi != NULL) {pOutCtx->Esi = *pInRD->pEsi;} else {pInRD->pEsi = NULL;}
if (pInRD->pEbx != NULL) {pOutCtx->Ebx = *pInRD->pEbx;} else {pInRD->pEbx = NULL;}
Expand All @@ -505,7 +505,7 @@ inline void CopyRegDisplay(const PREGDISPLAY pInRD, PREGDISPLAY pOutRD, T_CONTEX
// the reg number is the R/M number from ModR/M byte or base in SIB byte
inline size_t * getRegAddr (unsigned regNum, PTR_CONTEXT regs)
{
#ifdef _TARGET_X86_
#if defined(_TARGET_X86_) && !defined(WIN64EXCEPTIONS)
switch (regNum)
{
case 0:
Expand Down Expand Up @@ -562,7 +562,7 @@ inline void UpdateContextFromRegDisp(PREGDISPLAY pRegDisp, PT_CONTEXT pContext)
{
_ASSERTE((pRegDisp != NULL) && (pContext != NULL));

#if defined(_TARGET_X86_)
#if defined(_TARGET_X86_) && !defined(WIN64EXCEPTIONS)
pContext->ContextFlags = (CONTEXT_INTEGER | CONTEXT_CONTROL);
pContext->Edi = *pRegDisp->pEdi;
pContext->Esi = *pRegDisp->pEsi;
Expand Down

0 comments on commit cc26828

Please sign in to comment.