237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
|
#ifdef HAVE_SEH_EXCEPTIONS
extern EXCEPTION_DISPOSITION _GCC_specific_handler(PEXCEPTION_RECORD, void *,
PCONTEXT, PDISPATCHER_CONTEXT, _Unwind_Reason_Code (*)(int, int, uint64_t,
struct _Unwind_Exception *, struct _Unwind_Context *));
#endif
static objc_uncaught_exception_handler uncaughtExceptionHandler;
static struct objc_exception emergencyExceptions[NUM_EMERGENCY_EXCEPTIONS];
#ifdef OF_HAVE_THREADS
static of_spinlock_t emergencyExceptionsSpinlock;
OF_CONSTRUCTOR()
{
if (!of_spinlock_new(&emergencyExceptionsSpinlock))
|
|
|
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
|
#ifdef HAVE_SEH_EXCEPTIONS
extern EXCEPTION_DISPOSITION _GCC_specific_handler(PEXCEPTION_RECORD, void *,
PCONTEXT, PDISPATCHER_CONTEXT, _Unwind_Reason_Code (*)(int, int, uint64_t,
struct _Unwind_Exception *, struct _Unwind_Context *));
#endif
static objc_uncaught_exception_handler_t uncaughtExceptionHandler;
static struct objc_exception emergencyExceptions[NUM_EMERGENCY_EXCEPTIONS];
#ifdef OF_HAVE_THREADS
static of_spinlock_t emergencyExceptionsSpinlock;
OF_CONSTRUCTOR()
{
if (!of_spinlock_new(&emergencyExceptionsSpinlock))
|
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
|
if (_Unwind_RaiseException(&e->exception) == _URC_END_OF_STACK &&
uncaughtExceptionHandler != NULL)
uncaughtExceptionHandler(object);
OBJC_ERROR("_Unwind_RaiseException() returned!")
}
objc_uncaught_exception_handler
objc_setUncaughtExceptionHandler(objc_uncaught_exception_handler handler)
{
objc_uncaught_exception_handler old = uncaughtExceptionHandler;
uncaughtExceptionHandler = handler;
return old;
}
#ifdef HAVE_SEH_EXCEPTIONS
typedef EXCEPTION_DISPOSITION (*seh_personality_fn)(PEXCEPTION_RECORD, void *,
|
|
|
|
|
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
|
if (_Unwind_RaiseException(&e->exception) == _URC_END_OF_STACK &&
uncaughtExceptionHandler != NULL)
uncaughtExceptionHandler(object);
OBJC_ERROR("_Unwind_RaiseException() returned!")
}
objc_uncaught_exception_handler_t
objc_setUncaughtExceptionHandler(objc_uncaught_exception_handler_t handler)
{
objc_uncaught_exception_handler_t old = uncaughtExceptionHandler;
uncaughtExceptionHandler = handler;
return old;
}
#ifdef HAVE_SEH_EXCEPTIONS
typedef EXCEPTION_DISPOSITION (*seh_personality_fn)(PEXCEPTION_RECORD, void *,
|