if (info.ebpFrame)
{
_ASSERTE(stackDepth == 0);
-#if defined(WIN64EXCEPTIONS)
- taArgBase = GetCallerSp(pContext) - 2 * sizeof(TADDR);
-#else
- taArgBase = *pContext->pEbp;
-#endif
+ taArgBase = GetRegdisplayFP(pContext);
}
else
{
return NULL;
}
-#if defined(WIN64EXCEPTIONS)
- TADDR fp = GetCallerSp(pContext) - 2 * sizeof(TADDR);
-#else
TADDR fp = GetRegdisplayFP(pContext);
-#endif
TADDR taParamTypeArg = *PTR_TADDR(fp - GetParamTypeArgOffset(&info));
return PTR_VOID(taParamTypeArg);
if (info->ebpFrame)
{
- DWORD curEBP;
-
-#ifdef WIN64EXCEPTIONS
- curEBP = GetCallerSp(pContext) - 2 * 4;
-#else
- curEBP = *pContext->pEbp;
-#endif
+ DWORD curEBP = GetRegdisplayFP(pContext);
return PVOID(SIZE_T(curEBP - info->gsCookieOffset));
}
ENUM_CALLEE_SAVED_REGISTERS();
#undef CALLEE_SAVED_REGISTER
}
+
+inline void RestoreNonvolatileRegisterPointers(PT_KNONVOLATILE_CONTEXT_POINTERS pContextPointers, PKNONVOLATILE_CONTEXT pNonvolatileContext)
+{
+#define CALLEE_SAVED_REGISTER(reg) pContextPointers->reg = &pNonvolatileContext->reg;
+ ENUM_CALLEE_SAVED_REGISTERS();
+#undef CALLEE_SAVED_REGISTER
+}
#endif
#ifndef DACCESS_COMPILE
SetIP(pRD->pCurrentContext, 0);
#else // !USE_CURRENT_CONTEXT_IN_FILTER
RestoreNonvolatileRegisters(pRD->pCurrentContext, pDispatcherContext->CurrentNonVolatileContextRecord);
+ RestoreNonvolatileRegisterPointers(pRD->pCurrentContextPointers, pDispatcherContext->CurrentNonVolatileContextRecord);
#endif // USE_CURRENT_CONTEXT_IN_FILTER
*(pRD->pCallerContext) = *(pDispatcherContext->ContextRecord);