diff options
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/libsupc++/eh_personality.cc | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/libstdc++-v3/libsupc++/eh_personality.cc b/libstdc++-v3/libsupc++/eh_personality.cc index 19c204473..3ef761515 100644 --- a/libstdc++-v3/libsupc++/eh_personality.cc +++ b/libstdc++-v3/libsupc++/eh_personality.cc @@ -24,6 +24,10 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. +#ifdef TARGET_PERSONALITY_FUNCTION_MIDIPIX +#include <../../gcc/unwind-midipix.h> +#endif + #include <bits/c++config.h> #include <cstdlib> #include <bits/exception_defines.h> @@ -343,11 +347,18 @@ namespace __cxxabiv1 #ifdef _GLIBCXX_SJLJ_EXCEPTIONS #define PERSONALITY_FUNCTION __gxx_personality_sj0 #define __builtin_eh_return_data_regno(x) x +#elif defined(TARGET_PERSONALITY_FUNCTION) +#define PERSONALITY_FUNCTION __gxx_personality_imp #else #define PERSONALITY_FUNCTION __gxx_personality_v0 #endif +#ifdef TARGET_PERSONALITY_FUNCTION +static _Unwind_Reason_Code +#else extern "C" _Unwind_Reason_Code +#endif + #ifdef __ARM_EABI_UNWINDER__ PERSONALITY_FUNCTION (_Unwind_State state, struct _Unwind_Exception* ue_header, @@ -718,6 +729,22 @@ PERSONALITY_FUNCTION (int version, return _URC_INSTALL_CONTEXT; } +#ifdef TARGET_PERSONALITY_FUNCTION_MIDIPIX + +extern "C" +int __gxx_personality_seh0( + struct _nt_exception_record * erec, + void * this_frame, + mcontext_t * tctx, + struct _nt_dispatcher_context * dctx) +{ + return __unwind_exception_filter( + erec,this_frame,tctx,dctx, + __gxx_personality_imp); +} + +#endif + /* The ARM EABI implementation of __cxa_call_unexpected is in a different file so that the personality routine (PR) can be used standalone. The generic routine shared datastructures with the PR |