ObjFW  Diff

Differences From Artifact [3edc7f9b6e]:

  • File src/exceptions/OFException.h — part of check-in [f2a8bdf254] at 2013-05-25 11:40:28 on branch trunk — Switch back to backtrace().

    The reason is that __builtin_frame_address(n) for n > 0 seems to just
    crash on most platforms when -fomit-stack-pointer is specified, which
    seems to be the default for many platforms on -O2. The documentation
    says that __builtin_frame_address() should return NULL in case it can't
    get the frame, but it seems to crash instead.

    Therefore, this commit reverts to using backtrace() from execinfo.h, if
    available. However, as __builtin_frame_address() seems to always work on
    PPC (even with -fomit-frame-pointer) and seems to be the only way to get
    a backtrace on the Wii, this is still used if backtrace() is unavailable
    and __ppc__ defined. (user: js, size: 1912) [annotate] [blame] [check-ins using]

To Artifact [cc67cf334c]:


16
17
18
19
20
21
22


23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40

#import "OFObject.h"

@class OFString;
@class OFArray;
@class OFMutableArray;



/*!
 * @brief The base class for all exceptions in ObjFW
 *
 * The OFException class is the base class for all exceptions in ObjFW, except
 * the OFAllocFailedException.
 */
@interface OFException: OFObject
{
	Class _inClass;
	void *_backtrace[32];
	int _backtraceSize;
}

#ifdef OF_HAVE_PROPERTIES
@property (readonly) Class inClass;
#endif

/*!







>
>









|
<







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

35
36
37
38
39
40
41

#import "OFObject.h"

@class OFString;
@class OFArray;
@class OFMutableArray;

#define OF_BACKTRACE_SIZE 32

/*!
 * @brief The base class for all exceptions in ObjFW
 *
 * The OFException class is the base class for all exceptions in ObjFW, except
 * the OFAllocFailedException.
 */
@interface OFException: OFObject
{
	Class _inClass;
	void *_backtrace[OF_BACKTRACE_SIZE];

}

#ifdef OF_HAVE_PROPERTIES
@property (readonly) Class inClass;
#endif

/*!