diff options
author | Jonghyun Park <parjong@gmail.com> | 2017-02-21 22:47:11 +0900 |
---|---|---|
committer | Jan Vorlicek <janvorli@microsoft.com> | 2017-02-21 14:47:11 +0100 |
commit | e825dc96cf9ad32134bbaac4d1fbd2008f025ed2 (patch) | |
tree | 4be3ef447878f80eeb1bfc20ae87a53825b513d2 /src/vm/exceptionhandling.cpp | |
parent | a188cca37c0ff413dfbdbac81b7cb0374be15ce1 (diff) | |
download | coreclr-e825dc96cf9ad32134bbaac4d1fbd2008f025ed2.tar.gz coreclr-e825dc96cf9ad32134bbaac4d1fbd2008f025ed2.tar.bz2 coreclr-e825dc96cf9ad32134bbaac4d1fbd2008f025ed2.zip |
Use ADJUST_PC_UNWOUND_TO_CALL instead of _TARGET_XXX_ (#9686)
Diffstat (limited to 'src/vm/exceptionhandling.cpp')
-rw-r--r-- | src/vm/exceptionhandling.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/vm/exceptionhandling.cpp b/src/vm/exceptionhandling.cpp index 20929bc315..3cfca3e346 100644 --- a/src/vm/exceptionhandling.cpp +++ b/src/vm/exceptionhandling.cpp @@ -17,6 +17,10 @@ #include "eventtrace.h" #include "virtualcallstub.h" +#if defined(_TARGET_ARM_) || defined(_TARGET_ARM64_) || defined(_TARGET_X86_) +#define ADJUST_PC_UNWOUND_TO_CALL +#endif // _TARGET_ARM_ || _TARGET_ARM64_ || _TARGET_X86_ + #ifndef DACCESS_COMPILE // o Functions and funclets are tightly associated. In fact, they are laid out in contiguous memory. @@ -1428,7 +1432,7 @@ void ExceptionTracker::InitializeCrawlFrame(CrawlFrame* pcfThisFrame, Thread* pT #endif #endif // _TARGET_ARM_ || _TARGET_ARM64_ -#if defined(_TARGET_ARM_) || defined(_TARGET_ARM64_) || defined(_TARGET_X86_) +#ifdef ADJUST_PC_UNWOUND_TO_CALL // If the OS indicated that the IP is a callsite, then adjust the ControlPC by decrementing it // by two. This is done because unwinding at callsite will make ControlPC point to the // instruction post the callsite. If a protected region ends "at" the callsite, then @@ -1451,7 +1455,7 @@ void ExceptionTracker::InitializeCrawlFrame(CrawlFrame* pcfThisFrame, Thread* pT pcfThisFrame->isIPadjusted = true; } } -#endif // _TARGET_ARM_ || _TARGET_ARM64_ || _TARGET_X86_ +#endif // ADJUST_PC_UNWOUND_TO_CALL pcfThisFrame->codeInfo.Init(ControlPCForEHSearch); @@ -4317,7 +4321,7 @@ VOID UnwindManagedExceptionPass2(PAL_SEHException& ex, CONTEXT* unwindStartConte dispatcherContext.FunctionEntry = codeInfo.GetFunctionEntry(); dispatcherContext.ControlPc = controlPc; dispatcherContext.ImageBase = codeInfo.GetModuleBase(); -#if defined(_TARGET_ARM_) || defined(_TARGET_ARM64_) || defined(_TARGET_X86_) +#ifdef ADJUST_PC_UNWOUND_TO_CALL dispatcherContext.ControlPcIsUnwound = !!(currentFrameContext->ContextFlags & CONTEXT_UNWOUND_TO_CALL); #endif // Check whether we have a function table entry for the current controlPC. @@ -4468,7 +4472,7 @@ VOID DECLSPEC_NORETURN UnwindManagedExceptionPass1(PAL_SEHException& ex, CONTEXT dispatcherContext.FunctionEntry = codeInfo.GetFunctionEntry(); dispatcherContext.ControlPc = controlPc; dispatcherContext.ImageBase = codeInfo.GetModuleBase(); -#if defined(_TARGET_ARM_) || defined(_TARGET_ARM64_) || defined(_TARGET_X86_) +#ifdef ADJUST_PC_UNWOUND_TO_CALL dispatcherContext.ControlPcIsUnwound = !!(frameContext->ContextFlags & CONTEXT_UNWOUND_TO_CALL); #endif |