diff options
author | thomasvl@gmail.com <thomasvl@gmail.com@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2008-11-04 20:10:52 +0000 |
---|---|---|
committer | thomasvl@gmail.com <thomasvl@gmail.com@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2008-11-04 20:10:52 +0000 |
commit | 8ddb49cefd01b220ad5e1d2f0060b2a0ad54efdb (patch) | |
tree | b1cb7590d31d8086eb3929028303e1d16324e115 /Foundation/GTMStackTrace.h | |
parent | 750b28c89618586a0450cacb86e28cd709374c9d (diff) |
- Added has ability to check if a script has an open handler to GTMNSAppleScript+Handler.
- GTMStackTrace support for building a trace from the call stack in an NSException (for 10.5+ and iPhone).
- Added GTMUIFont+LineHeight.
- Cleaned up some OS version checks to use constants instead of numbers directly.
Diffstat (limited to 'Foundation/GTMStackTrace.h')
-rw-r--r-- | Foundation/GTMStackTrace.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Foundation/GTMStackTrace.h b/Foundation/GTMStackTrace.h index 3b6965d..9726da5 100644 --- a/Foundation/GTMStackTrace.h +++ b/Foundation/GTMStackTrace.h @@ -51,7 +51,17 @@ struct GTMAddressDescriptor { // #6 0x000025b9 tart () [/Users/me/./StackLog] // +#ifdef GTM_MACOS_SDK // currently not supported on iPhone NSString *GTMStackTrace(void); +#endif + +#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 +// Returns a string containing a nicely formatted stack trace from the +// exception. Only available on 10.5 or later, uses +// -[NSException callStackReturnAddresses]. +// +NSString *GTMStackTraceFromException(NSException *e); +#endif // Returns an array of program counters from the current thread's stack. // *** You should probably use GTMStackTrace() instead of this function *** @@ -67,7 +77,9 @@ NSString *GTMStackTrace(void); // Returns: // The number of program counters actually added to outPcs. // +#ifdef GTM_MACOS_SDK // currently not supported on iPhone NSUInteger GTMGetStackProgramCounters(void *outPcs[], NSUInteger count); +#endif // Returns an array of GTMAddressDescriptors from the current thread's stack. // *** You should probably use GTMStackTrace() instead of this function *** @@ -85,8 +97,11 @@ NSUInteger GTMGetStackProgramCounters(void *outPcs[], NSUInteger count); // Returns: // The number of program counters actually added to outPcs. // +#ifdef GTM_MACOS_SDK // currently not supported on iPhone NSUInteger GTMGetStackAddressDescriptors(struct GTMAddressDescriptor outDescs[], NSUInteger count); +#endif + #ifdef __cplusplus } #endif |