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 protected])

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 [EMAIL PROTECTED]

Reply via email to