return (FaultingExceptionFrame*)((TADDR)pDispatcherContext->ContextRecord->R4);
}
+//Return TRUE if pContext->Pc is in VirtualStub
+BOOL IsIPinVirtualStub(PCODE f_IP)
+{
+ LIMITED_METHOD_CONTRACT;
+
+ Thread * pThread = GetThread();
+
+ // We may not have a managed thread object. Example is an AV on the helper thread.
+ // (perhaps during StubManager::IsStub)
+ if (pThread == NULL)
+ {
+ return FALSE;
+ }
+
+ VirtualCallStubManager::StubKind sk;
+ VirtualCallStubManager::FindStubManager(f_IP, &sk);
+
+ if (sk == VirtualCallStubManager::SK_DISPATCH)
+ {
+ return TRUE;
+ }
+ else if (sk == VirtualCallStubManager::SK_RESOLVE)
+ {
+ return TRUE;
+ }
+
+ else {
+ return FALSE;
+ }
+}
+
+
// Returns TRUE if caller should resume execution.
BOOL
AdjustContextForVirtualStub(
}
BOOL AdjustContextForVirtualStub(EXCEPTION_RECORD *pExceptionRecord, T_CONTEXT *pContext);
+BOOL IsIPinVirtualStub(PCODE f_IP);
#endif // __excepcpu_h__
#include "eedbginterfaceimpl.inl"
#include "perfcounters.h"
#include "eventtrace.h"
+#include "virtualcallstub.h"
#ifndef DACCESS_COMPILE
exceptionRecord->ExceptionCode == STATUS_BREAKPOINT ||
exceptionRecord->ExceptionCode == STATUS_SINGLE_STEP ||
(IsSafeToCallExecutionManager() && ExecutionManager::IsManagedCode(controlPc)) ||
+#ifdef _TARGET_ARM_
+ IsIPinVirtualStub(controlPc) || // access violation comes from DispatchStub of Interface call
+#endif
IsIPInMarkedJitHelper(controlPc));
}
PAL_VirtualUnwind(&ex->ContextRecord, NULL);
ex->ExceptionRecord.ExceptionAddress = (PVOID)GetIP(&ex->ContextRecord);
}
+#ifdef _TARGET_ARM_
+ else if (IsIPinVirtualStub(controlPc))
+ {
+ AdjustContextForVirtualStub(&ex->ExceptionRecord, &ex->ContextRecord);
+ }
+#endif
fef.InitAndLink(&ex->ContextRecord);
}