Correctly handle forced unwinding on ARM.

Parch by Mathias Bauer!
main
theraven 12 years ago
parent a8fe7efdae
commit 05243617bf

@ -21,10 +21,12 @@ typedef uint32_t _Unwind_State;
static const _Unwind_State _US_VIRTUAL_UNWIND_FRAME = 0; 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_STARTING = 1;
static const _Unwind_State _US_UNWIND_FRAME_RESUME = 2; 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 #else // GCC fails at knowing what a constant expression is
# define _US_VIRTUAL_UNWIND_FRAME 0 # define _US_VIRTUAL_UNWIND_FRAME 0
# define _US_UNWIND_FRAME_STARTING 1 # define _US_UNWIND_FRAME_STARTING 1
# define _US_UNWIND_FRAME_RESUME 2 # define _US_UNWIND_FRAME_RESUME 2
# define _US_FORCE_UNWIND 8
#endif #endif
typedef int _Unwind_Action; typedef int _Unwind_Action;
@ -171,7 +173,7 @@ _Unwind_Reason_Code name(_Unwind_State state,\
int version = 1;\ int version = 1;\
uint64_t exceptionClass = exceptionObject->exception_class;\ uint64_t exceptionClass = exceptionObject->exception_class;\
int actions;\ int actions;\
switch (state)\ switch (state & ~_US_FORCE_UNWIND)\
{\ {\
default: return _URC_FAILURE;\ default: return _URC_FAILURE;\
case _US_VIRTUAL_UNWIND_FRAME:\ case _US_VIRTUAL_UNWIND_FRAME:\

Loading…
Cancel
Save