Re: objc_exception_throw prior to launching nib file
Re: objc_exception_throw prior to launching nib file
- Subject: Re: objc_exception_throw prior to launching nib file
- From: Daniel Child <email@hidden>
- Date: Wed, 22 Apr 2009 17:09:05 -0400
OK, I've set those commands and got this.
Running…
Cannot perform operation without a managed object context
Value can't be converted to integer.
(gdb)
I'm not sure why it thinks it needs one BEFORE I do anything. I
described things slightly incorrectly.
If I set a breakpoint:
the window (from nib) appears
then gdb comes up
What is strange is that the breakpoint should not be executed I press
a button in the window. In fact, if I don't set a manual breakpoint
and run the app, I can in fact press the button and perform an action.
(The action needs to be debugged, but that is a separate matte.) The
problem is not being able to debug the portion of code after the
window appears.
If a managed object context were needed at that point, it should have
said something when I run without code. No?
On Apr 22, 2009, at 4:28 PM, Nick Zitzmann wrote:
On Apr 22, 2009, at 2:20 PM, Daniel Child wrote:
(gdb) po *(int *)($ebp+8)
Cannot access memory at address 0x1
(gdb)
Something's still not right here. On Intel 32, $ebp+8 points to the
first argument in a function call, which would be the NSException
object passed into objc_exception_throw().
Are you sure you are trying this after, and **only** after, the
debugger hits objc_exception_throw(), but before continuing
execution? If so, are you sure you are looking at the top of the
stack?
If it helps, I always put the following two debugger commands into
my objc_exception_throw breakpoints:
po *(int *)($ebp+8)
po $rdi
(The latter is for debugging 64-bit apps, since there's apparently
no way to set debugger commands on a per-architecture basis.)
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden