Index: src/exceptions/OFException.m ================================================================== --- src/exceptions/OFException.m +++ src/exceptions/OFException.m @@ -33,11 +33,20 @@ #if defined(_WIN32) && defined(OF_HAVE_SOCKETS) # include # include #endif -#if defined(HAVE_DWARF_EXCEPTIONS) || defined(OBJC_ZEROCOST_EXCEPTIONS) +/* + * Define HAVE_DWARF_EXCEPTIONS if OBJC_ZEROCOST_EXCEPTIONS is defined, but + * don't do so on 32-bit ARM, as it is defined there even if SjLj exceptions + * are used. + */ +#if defined(OBJC_ZEROCOST_EXCEPTIONS) && !defined(__ARMEL__) +# define HAVE_DWARF_EXCEPTIONS +#endif + +#ifdef HAVE_DWARF_EXCEPTIONS struct _Unwind_Context; typedef enum { _URC_OK = 0, _URC_END_OF_STACK = 5 }_Unwind_Reason_Code; @@ -109,11 +118,11 @@ + (instancetype)exception { return [[[self alloc] init] autorelease]; } -#if defined(HAVE_DWARF_EXCEPTIONS) || defined(OBJC_ZEROCOST_EXCEPTIONS) +#ifdef HAVE_DWARF_EXCEPTIONS - init { struct backtrace_ctx ctx; self = [super init]; @@ -132,11 +141,11 @@ @"An exception of type %@ occurred!", [self class]]; } - (OFArray*)backtrace { -#if defined(HAVE_DWARF_EXCEPTIONS) || defined(OBJC_ZEROCOST_EXCEPTIONS) +#ifdef HAVE_DWARF_EXCEPTIONS OFMutableArray *backtrace = [OFMutableArray array]; void *pool = objc_autoreleasePoolPush(); uint_fast8_t i; for (i = 0; i < OF_BACKTRACE_SIZE && _backtrace[i] != NULL; i++) {