diff options
Diffstat (limited to 'libobjc')
-rw-r--r-- | libobjc/exception.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/libobjc/exception.c b/libobjc/exception.c index 1ffb80b53..239320240 100644 --- a/libobjc/exception.c +++ b/libobjc/exception.c @@ -22,6 +22,10 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ +#ifdef TARGET_PERSONALITY_FUNCTION_MIDIPIX +#include "unwind-midipix.h" +#endif + #include "objc-private/common.h" #include <stdlib.h> #include "config.h" @@ -225,6 +229,8 @@ get_ttype_entry (struct lsda_header_info *info, _Unwind_Word i) #ifdef SJLJ_EXCEPTIONS #define PERSONALITY_FUNCTION __gnu_objc_personality_sj0 #define __builtin_eh_return_data_regno(x) x +#elif defined(TARGET_PERSONALITY_FUNCTION) +#define PERSONALITY_FUNCTION __gnu_objc_personality_imp #else #define PERSONALITY_FUNCTION __gnu_objc_personality_v0 #endif @@ -240,6 +246,9 @@ get_ttype_entry (struct lsda_header_info *info, _Unwind_Word i) } \ while (0) +#ifdef TARGET_PERSONALITY_FUNCTION +static +#endif _Unwind_Reason_Code PERSONALITY_FUNCTION (_Unwind_State state, struct _Unwind_Exception *ue_header, @@ -509,6 +518,21 @@ PERSONALITY_FUNCTION (int version, return _URC_INSTALL_CONTEXT; } +#ifdef TARGET_PERSONALITY_FUNCTION_MIDIPIX + +int __gnu_objc_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, + __gnu_objc_personality_imp); +} + +#endif + static void __objc_exception_cleanup (_Unwind_Reason_Code code __attribute__((unused)), struct _Unwind_Exception *exc) |