|
|
|
|
@ -550,9 +550,9 @@ static inline _Unwind_Reason_Code internal_objc_personality(int version,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_Unwind_SetIP(context, (unsigned long)action.landing_pad);
|
|
|
|
|
_Unwind_SetIP(context, (uintptr_t)action.landing_pad);
|
|
|
|
|
_Unwind_SetGR(context, __builtin_eh_return_data_regno(0),
|
|
|
|
|
(unsigned long)(isNew ? exceptionObject : object));
|
|
|
|
|
(uintptr_t)(isNew ? exceptionObject : object));
|
|
|
|
|
_Unwind_SetGR(context, __builtin_eh_return_data_regno(1), selector);
|
|
|
|
|
|
|
|
|
|
DEBUG_LOG("Installing context, selector %d\n", (int)selector);
|
|
|
|
|
@ -560,15 +560,19 @@ static inline _Unwind_Reason_Code internal_objc_personality(int version,
|
|
|
|
|
return _URC_INSTALL_CONTEXT;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
OBJC_PUBLIC
|
|
|
|
|
BEGIN_PERSONALITY_FUNCTION(__gnu_objc_personality_v0)
|
|
|
|
|
return internal_objc_personality(version, actions, exceptionClass,
|
|
|
|
|
exceptionObject, context, NO);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
OBJC_PUBLIC
|
|
|
|
|
BEGIN_PERSONALITY_FUNCTION(__gnustep_objc_personality_v0)
|
|
|
|
|
return internal_objc_personality(version, actions, exceptionClass,
|
|
|
|
|
exceptionObject, context, YES);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
OBJC_PUBLIC
|
|
|
|
|
BEGIN_PERSONALITY_FUNCTION(__gnustep_objcxx_personality_v0)
|
|
|
|
|
#ifndef NO_OBJCXX
|
|
|
|
|
if (cxx_exception_class == 0)
|
|
|
|
|
@ -584,11 +588,11 @@ BEGIN_PERSONALITY_FUNCTION(__gnustep_objcxx_personality_v0)
|
|
|
|
|
}
|
|
|
|
|
// We now have two copies of the _Unwind_Exception object (which stores
|
|
|
|
|
// state for the unwinder) in flight. Make sure that they're in sync.
|
|
|
|
|
COPY_EXCEPTION(ex->cxx_exception, exceptionObject)
|
|
|
|
|
COPY_EXCEPTION(ex->cxx_exception, exceptionObject);
|
|
|
|
|
exceptionObject = ex->cxx_exception;
|
|
|
|
|
exceptionClass = cxx_exception_class;
|
|
|
|
|
int ret = CALL_PERSONALITY_FUNCTION(__gxx_personality_v0);
|
|
|
|
|
COPY_EXCEPTION(exceptionObject, ex->cxx_exception)
|
|
|
|
|
COPY_EXCEPTION(exceptionObject, ex->cxx_exception);
|
|
|
|
|
if (ret == _URC_INSTALL_CONTEXT)
|
|
|
|
|
{
|
|
|
|
|
get_thread_data()->cxxCaughtException = YES;
|
|
|
|
|
@ -599,7 +603,7 @@ BEGIN_PERSONALITY_FUNCTION(__gnustep_objcxx_personality_v0)
|
|
|
|
|
return CALL_PERSONALITY_FUNCTION(__gxx_personality_v0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
id objc_begin_catch(struct _Unwind_Exception *exceptionObject)
|
|
|
|
|
OBJC_PUBLIC id objc_begin_catch(struct _Unwind_Exception *exceptionObject)
|
|
|
|
|
{
|
|
|
|
|
struct thread_data *td = get_thread_data();
|
|
|
|
|
DEBUG_LOG("Beginning catch %p\n", exceptionObject);
|
|
|
|
|
@ -671,7 +675,7 @@ id objc_begin_catch(struct _Unwind_Exception *exceptionObject)
|
|
|
|
|
return (id)((char*)exceptionObject + sizeof(struct _Unwind_Exception));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void objc_end_catch(void)
|
|
|
|
|
OBJC_PUBLIC void objc_end_catch(void)
|
|
|
|
|
{
|
|
|
|
|
struct thread_data *td = get_thread_data_fast();
|
|
|
|
|
// If this is a boxed foreign exception then the boxing class is
|
|
|
|
|
@ -717,7 +721,7 @@ void objc_end_catch(void)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void objc_exception_rethrow(struct _Unwind_Exception *e)
|
|
|
|
|
OBJC_PUBLIC void objc_exception_rethrow(struct _Unwind_Exception *e)
|
|
|
|
|
{
|
|
|
|
|
struct thread_data *td = get_thread_data_fast();
|
|
|
|
|
// If this is an Objective-C exception, then
|
|
|
|
|
|