• 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
Re: Setting conditional breakpoint on Cocoa method?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Setting conditional breakpoint on Cocoa method? [SOLVED]
      • From: Graham Cox <email@hidden>
References: 
 >Setting conditional breakpoint on Cocoa method? (From: Graham Cox <email@hidden>)
 >Re: Setting conditional breakpoint on Cocoa method? (From: "Jonathan del Strother" <email@hidden>)
 >Re: Setting conditional breakpoint on Cocoa method? (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Repositioning a content view w/in a window
  • Next by Date: Re: Efficient Updating of Thousands of NSManagedObject Relationships
  • Previous by thread: Re: Setting conditional breakpoint on Cocoa method?
  • Next by thread: Re: Setting conditional breakpoint on Cocoa method? [SOLVED]
  • Index(es):
    • Date
    • Thread