• 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: Getting the arguments of methods in other frameworks (from GDB)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting the arguments of methods in other frameworks (from GDB)


  • Subject: Re: Getting the arguments of methods in other frameworks (from GDB)
  • From: Andre <email@hidden>
  • Date: Tue, 13 Dec 2005 16:32:36 -0800


Dave Hayden wrote:

On Dec 12, 2005, at 12:34 PM, email@hidden wrote:

As an example in : -[NSNotificationCenter postNotificationName:object:userInfo:]
I want to get the args passed to this method, but I cant... even with the debug version of appkit.

On PPC machines, you can find everything in the registers: r3 contains the "self" pointer, r4 is the current selector (as a SEL, which is a char*), and the arguments are stored in r5 and up. So here, you could do "po $r5" in gdb to get the selector name or "po $r7" to see the userInfo dict.
Yea, but doesn't this only give me what's at the top of the call stack? The current frame?
IOW, the top frame that is currently executing, I can get the address of self by register 3 and the selector at register 4 BUT I cant get the selector for anything but the top frame.
So, if the frame -[NSNotificationCenter postNotificationName:object:userInfo:] is not the top, how can I go back and pull its selector arguments?
Aside from breaking at every call to -[NSNotificationCenter postNotificationName:object:userInfo:]...

Is that what you're asking, or something else?
Similar but I'm wondering how to get this for further up the call stack. (Sometimes results later in the stack could be caused by something further up the chain for example so I wanna see what the initial event that causes something later on and trips the debugger)

-Dave
Panic, Inc.
Thanks for the help.

Andre
_______________________________________________
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: Getting the arguments of methods in other frameworks (from GDB)
      • From: Andrew Farmer <email@hidden>
References: 
 >Getting the arguments of methods in other frameworks (from GDB) (From: email@hidden)
 >Re: Getting the arguments of methods in other frameworks (from GDB) (From: Dave Hayden <email@hidden>)

  • Prev by Date: Re: NSAppleScript init is really, really slow when attached to gdb?
  • Next by Date: Re: _arrangedObjects not allocated
  • Previous by thread: Re: Getting the arguments of methods in other frameworks (from GDB)
  • Next by thread: Re: Getting the arguments of methods in other frameworks (from GDB)
  • Index(es):
    • Date
    • Thread