• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Using Mac OS X "debug" or "profile" -suffixed frameworks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using Mac OS X "debug" or "profile" -suffixed frameworks


  • Subject: Using Mac OS X "debug" or "profile" -suffixed frameworks
  • From: Jerry Krinock <email@hidden>
  • Date: Sun, 19 Jul 2009 23:00:38 -0700

I'd like to test my app with more strict libraries that would warn me of programming errors before shipping. I recently found the following March 2008 post from Ben Trumbull of Apple explaining how to use the "debug" framework:

   http://lists.apple.com/archives/cocoa-dev/2008/Mar/msg01098.html

Of course, the link he gives in there is now dead. The only reference I can find in Apple documentation regarding "debug" and "profile" libraries is in the Mac OS X Debugging Magic TN 2124:

   http://developer.apple.com/technotes/tn2004/tn2124.html#SECDYLD

This seems to be telling me that:

(a) All I need to do is inspect my Executable and in the General tab, switch
to "Use [[debug]] suffix when loading frameworks.


(b) I should expect this to make my app crash upon launch unless I have a
down-rev Mac OS X "point" release which is of the same vintage as my Xcode
version.


Well, I have Xcode 3.1.2 and Mac OS 10.5.7. Probably these are not "compatible" in the "debug library" sense, but I figured, what the hell, since it's just changing the value of the popup and running I'd give it a try. Just for good measure I enabled all the breakpoints suggested by Ben,

handleFailureInMethod:object:file:lineNumber:description:
handleFailureInMethod:object:file:lineNumber:description:
+[NSError errorWithDomain:code:userInfo:];
objc_exception_throw
raise:format:arguments:

and in the menu clicked "Debug" instead of "Run".

To my surprise, the app did not crash on launch.

It does seem to be using _debug frameworks, though, because when gdb starts I get hundreds of messages similar to this:

warning: Could not find object file "/var/tmp/Libsystem/ Libsystem-111~826/i386/objroot/objects-debug/System_vers.o" - no debug information available for "/var/tmp/Libsystem/Libsystem-111~826/i386/ symroot/System.build/derived_src/System_vers.c". Also, if I purposely make it crash, Xcode is unable to produce a call stack.

But the biggest surprise is, after running my app through its paces for a few minutes, I get no additional warnings or errors logged to console. I was expecting the "_debug" library to warn about any programming errors and find it hard to believe that my app is perfect :)

Does this "debug" framework which I appear to have switched in have, for example, the extra Core Data strictness advertised by Ben Trumbull in March 2008?

What else do I need to know about Mac OS X "debug" and "profile" frameworks. To my surprise, there are only 19 messages discussing this in the list archives and, as I said, scant mention in Apple tech notes or whatever.

Thanks,

Jerry Krinock

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: icu on Mac OS X
  • Next by Date: Re: iPhone device debugger starts in Release mode
  • Previous by thread: Re: icu on Mac OS X
  • Next by thread: updating help-book in Xcode
  • Index(es):
    • Date
    • Thread