Differences From Artifact [76191c1054]:
- File
src/exceptions/OFException.m
— part of check-in
[353b3ba81d]
at
2013-12-01 11:51:02
on branch trunk
— OFException: Do not show <??+offset>.
The offset is useless if the symbol is unknown, especially if it gets
large because the offset is relative to 0. (user: js, size: 3773) [annotate] [blame] [check-ins using]
To Artifact [6a81d34ff8]:
- File
src/exceptions/OFException.m
— part of check-in
[65d8a7c8ed]
at
2013-12-10 01:47:27
on branch trunk
— Ignore OBJC_ZEROCOST_EXCEPTIONS on ARM.
It seems to be defined when targeting 32-bit iOS, even though it does
not use zero-cost exceptions. (user: js, size: 3917) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
31 32 33 34 35 36 37 | #import "autorelease.h" #if defined(_WIN32) && defined(OF_HAVE_SOCKETS) # include <errno.h> # include <winerror.h> #endif | > > > > > | > > > > | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | #import "autorelease.h" #if defined(_WIN32) && defined(OF_HAVE_SOCKETS) # include <errno.h> # include <winerror.h> #endif /* * 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; struct backtrace_ctx { |
︙ | ︙ | |||
107 108 109 110 111 112 113 | @implementation OFException + (instancetype)exception { return [[[self alloc] init] autorelease]; } | | | 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | @implementation OFException + (instancetype)exception { return [[[self alloc] init] autorelease]; } #ifdef HAVE_DWARF_EXCEPTIONS - init { struct backtrace_ctx ctx; self = [super init]; ctx.backtrace = _backtrace; |
︙ | ︙ | |||
130 131 132 133 134 135 136 | { return [OFString stringWithFormat: @"An exception of type %@ occurred!", [self class]]; } - (OFArray*)backtrace { | | | 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | { return [OFString stringWithFormat: @"An exception of type %@ occurred!", [self class]]; } - (OFArray*)backtrace { #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++) { # ifdef HAVE_DLADDR Dl_info info; |
︙ | ︙ |