From 2e8516354aacef064d01425808da06d2cdcb4791 Mon Sep 17 00:00:00 2001 From: "thomasvl@gmail.com" Date: Fri, 12 Dec 2008 15:24:34 +0000 Subject: - GTMStackTrace works on 10.5+ (and iPhone) using NSThread to build the call stack. - Added GTM_EXTERN that makes it easier to mix and match objc and objc++ code. - Added GTMHotKeysTextField for display and editing of hot key settings. - Added GTMCarbonEvent for dealing with Carbon Events and HotKeys in a ObjC like way. - Backported the Atomic Barrier Swap functions for Objective C back to Tiger. - Added a variety of new functions to GTMUnitTestingUtilities for checking if the screensaver is in the way, waiting on user events, and generating keystrokes. - If you are using any Carbon routines that log (DebugStr, AssertMacros.h) and use GTMUnitTestDevLog, the log routines now go through _GTMDevLog so that they can be caught in GTMUnitTestDevLog and verified like any _GTMDevLog calls you may make. For an example of this in action see GTMCarbonEventTest.m. - Added GTMFileSystemKQueue. It provides a simple wrapper for kqueuing something in the file system and tracking changes to it. - RunIPhoneUnitTest.sh now cleans up the user home directory and creates a documents directory within it, used when requesting a NSDocumentDirectory. - Added GTMNSFileManager+Carbon which contains routines for path <-> Alias conversion and path <-> FSRef conversion. - Added GTMNSArray+Merge for merging one array into another with or without a custom merging function, returning a new array with the merged contents. --- Foundation/GTMStackTrace.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'Foundation/GTMStackTrace.h') diff --git a/Foundation/GTMStackTrace.h b/Foundation/GTMStackTrace.h index 9726da5..d8cc642 100644 --- a/Foundation/GTMStackTrace.h +++ b/Foundation/GTMStackTrace.h @@ -51,9 +51,7 @@ 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 @@ -63,12 +61,15 @@ NSString *GTMStackTrace(void); NSString *GTMStackTraceFromException(NSException *e); #endif +#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 // Returns an array of program counters from the current thread's stack. // *** You should probably use GTMStackTrace() instead of this function *** // However, if you actually want all the PCs in "void *" form, then this // funtion is more convenient. This will include PCs of GTMStaceTrace and // its inner utility functions that you may want to strip out. // +// You can use +[NSThread callStackReturnAddresses] in 10.5 or later. +// // Args: // outPcs - an array of "void *" pointers to the program counters found on the // current thread's stack. @@ -77,9 +78,8 @@ NSString *GTMStackTraceFromException(NSException *e); // 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 +#endif // MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 // Returns an array of GTMAddressDescriptors from the current thread's stack. // *** You should probably use GTMStackTrace() instead of this function *** @@ -97,10 +97,8 @@ 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 } -- cgit v1.2.3