Re: Setting conditional breakpoint on Cocoa method?
Re: Setting conditional breakpoint on Cocoa method?
- Subject: Re: Setting conditional breakpoint on Cocoa method?
- From: Ken Thomases <email@hidden>
- Date: Mon, 28 Jul 2008 18:38:39 -0500
On Jul 28, 2008, at 7:30 AM, Graham Cox wrote:
One thing that I'm a bit unsure about. If I enter a symbolic
breakpoint, will it break on the first instruction of that method
or further along?
The breakpoint is after the local frame has been set up:
$ gdb /Applications/TextEdit.app/Contents/MacOS/TextEdit
[...]
(gdb) run
Starting program: /Applications/TextEdit.app/Contents/MacOS/TextEdit
[...]
^C
Program received signal SIGINT, Interrupt.
0x90009cd7 in mach_msg_trap ()
(gdb) break -[NSConcreteAttributedString initWithString:]
Breakpoint 1 at 0x927fb612
(gdb) info break
Num Type Disp Enb Address What
1 breakpoint keep y 0x927fb612 <-[NSConcreteAttributedString
initWithString:]+5>
Notice the "+5" in the breakpoint description. If you were to hit
that breakpoint and disassemble the current function, you'd see it's
past the point where the old frame pointer is pushed and the current
stack pointer is copied to be the new frame pointer.
Cheers,
Ken
_______________________________________________
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