On Wed, Oct 14, 2009 at 10:30 AM, Rick Mann <rm...@latencyzero.com> wrote: > Is there a way I can get at that programmatically, rather than via gdb? I'm > very clumsy in gdb.
Your time will be better spent learning how to use the debugger. Quick crash course: 1. Use `po` to print objects. Example: >> po theError <NSError 0x12345678> 2. Use regular ObjC syntax to call methods on objects. Sometimes you need to provide type information, because gdb doesn't have as much information available to it as the compiler does. Example: >> po (id)[theError description] "The document could not be opened." 3. Use the `call` command to call arbitrary functions, methods, etc. Again, casting might be necessary. >> call (void)NSLog(@"The error says: %@", (id)[theError description]) debugged-process[2134] 00:00:00 The error says: The document could not be opened. Of course, use the Debugger panel to select different stack frames, which in turn affects what variables are in scope. --Kyle Sluder _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com