mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
* Source/NSException.m:
* Headers/Foundation/NSThread.h: Add trivial implementation of +[NSThread callStackSymbols] that uses GSStackTrace. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37249 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5814ca0029
commit
b6fd2dd2ff
3 changed files with 26 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2013-10-17 Eric Wasylishen <ewasylishen@gmail.com>
|
||||
|
||||
* Source/NSException.m:
|
||||
* Headers/Foundation/NSThread.h: Add trivial implementation of
|
||||
+[NSThread callStackSymbols] that uses GSStackTrace.
|
||||
|
||||
2013-10-15 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Headers/Foundation/NSDate.h,
|
||||
|
|
|
@ -325,6 +325,16 @@ extern "C" {
|
|||
#endif
|
||||
@end
|
||||
|
||||
@interface NSThread (CallStackSymbols)
|
||||
#if GS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
||||
/** Returns an array of NSString objects representing the current stack
|
||||
* in an implementation-defined format. May return an empty array if
|
||||
* this feature is not available.
|
||||
*/
|
||||
+ (NSArray *) callStackSymbols;
|
||||
#endif
|
||||
@end
|
||||
|
||||
#if GS_API_VERSION(GS_API_NONE, GS_API_NONE)
|
||||
/*
|
||||
* Don't use the following functions unless you really know what you are
|
||||
|
|
|
@ -1107,6 +1107,16 @@ callUncaughtHandler(id value)
|
|||
|
||||
@end
|
||||
|
||||
@implementation NSThread (CallStackSymbols)
|
||||
|
||||
+ (NSArray *) callStackSymbols
|
||||
{
|
||||
GSStackTrace *stackTrace = [[[GSStackTrace alloc] init] autorelease];
|
||||
NSArray *symbols = [stackTrace symbols];
|
||||
return symbols;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
void
|
||||
_NSAddHandler (NSHandler* handler)
|
||||
|
|
Loading…
Reference in a new issue