From 05243617bf72fb150ff4174386174113c377b954 Mon Sep 17 00:00:00 2001 From: theraven Date: Wed, 19 Mar 2014 07:10:59 +0000 Subject: [PATCH] Correctly handle forced unwinding on ARM. Parch by Mathias Bauer! --- unwind-arm.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/unwind-arm.h b/unwind-arm.h index fa89e8c..0860c4b 100644 --- a/unwind-arm.h +++ b/unwind-arm.h @@ -21,10 +21,12 @@ typedef uint32_t _Unwind_State; static const _Unwind_State _US_VIRTUAL_UNWIND_FRAME = 0; static const _Unwind_State _US_UNWIND_FRAME_STARTING = 1; static const _Unwind_State _US_UNWIND_FRAME_RESUME = 2; +static const _Unwind_State _US_FORCE_UNWIND = 8; #else // GCC fails at knowing what a constant expression is # define _US_VIRTUAL_UNWIND_FRAME 0 # define _US_UNWIND_FRAME_STARTING 1 # define _US_UNWIND_FRAME_RESUME 2 +# define _US_FORCE_UNWIND 8 #endif typedef int _Unwind_Action; @@ -171,7 +173,7 @@ _Unwind_Reason_Code name(_Unwind_State state,\ int version = 1;\ uint64_t exceptionClass = exceptionObject->exception_class;\ int actions;\ - switch (state)\ + switch (state & ~_US_FORCE_UNWIND)\ {\ default: return _URC_FAILURE;\ case _US_VIRTUAL_UNWIND_FRAME:\