• 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: Breakpoint on arbitrary selector
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Breakpoint on arbitrary selector


  • Subject: RE: Breakpoint on arbitrary selector
  • From: "Jonathan E. Jackel" <email@hidden>
  • Date: Thu, 27 Jan 2005 11:25:53 -0500
  • Importance: Normal

There is an easy way to do this in the XCode debugger.  Bring up the
breakpoints window and create a new breakpoint.  Type [BobController
slackOff:].  Jonathan.

> -----Original Message-----
> From: cocoa-dev-bounces+jonathan=email@hidden
> [mailto:cocoa-dev-bounces+jonathan=email@hidden]On Behalf
> Of daniel
> Sent: Wednesday, January 26, 2005 6:04 PM
> To: Cocoa Dev Dev
> Subject: Breakpoint on arbitrary selector
>
>
>
> Sometimes when I'm debugging (OK, or hacking) something, a selector
> that I know is implemented by one of the classes in the target project
> is just not recognized by the debugger.  No tab-completion, etc.  Even
> the class is not recognized.  Yet looking up a class object by
> NSClassFromString and selector from NSSelectorFromString return
> reasonable looking values.
>
> Let's say I know a class "BobController" has a method "slackOff:" - I
> get a SEL from NSSelectorFromString(@"slackOff:").  It returns 111300.
> I examine memory at that location and sure enough, it looks like a
> selector!  I set a conditional breakpoint on objC_msgSend, to break
> whenever $r4==111300, and run the program.
>
> A very slow launch later, I perform a user action to provoke that
> method (in this case, a menu item that InterfaceBuilder shows as being
> targeted to "BobController" with an action of "slackOff:").  No
> breakpoint!
>
> Is it unrealistic for me to assume that all messages will get sent
> through objC_msgSend?  What is gdb doing when it sets a breakpoint on
> an Objective C method symbol?  I guess I could look it up in the
> source... any thoughts?
>
> Daniel
>
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Breakpoint on arbitrary selector
      • From: daniel <email@hidden>
References: 
 >Breakpoint on arbitrary selector (From: daniel <email@hidden>)

  • Prev by Date: Re: Problems with custom NSView subclass, IBPalette, and bindings support
  • Next by Date: Sheet animation ignoring hasShadow
  • Previous by thread: Breakpoint on arbitrary selector
  • Next by thread: Re: Breakpoint on arbitrary selector
  • Index(es):
    • Date
    • Thread