Re: Inspecting Obj-C method parameters from gdb
Re: Inspecting Obj-C method parameters from gdb
- Subject: Re: Inspecting Obj-C method parameters from gdb
- From: "Shawn Erickson" <email@hidden>
- Date: Tue, 6 May 2008 09:03:31 -0700
On Tue, May 6, 2008 at 8:12 AM, Sean McBride <email@hidden> wrote:
> Hi all,
>
> I've read conflicting info in TN2124 (Debugging Magic) and the list
> archives, so I'm hoping someone can straighten this out. :)
>
> If I'm debugging Obj-C code for which I don't have source, how can I
> inspect method parameters? My understanding is on ppc 'self' is in $r3
> and '_cmd' (the method selector) is in $r4.
>
> On i386, I've seen some references to 'esp + 4' and others to 'ebp +
> 8'. But I'm not sure which is correct.
>
> And as for ppc64 and x86_64, I can't find much info at all.
ppc64 an ppc should be the same and x86_64 is more like ppc64/ppc then
x86 (IA32).
Anyway I often look at the ABI docs to understand the expected
parameter passing behavior.
<http://developer.apple.com/documentation/DeveloperTools/Conceptual/LowLevelABI/Articles/32bitPowerPC.html#//apple_ref/doc/uid/TP40002438-SW17>
<http://developer.apple.com/documentation/DeveloperTools/Conceptual/LowLevelABI/Articles/64bitPowerPC.html#//apple_ref/doc/uid/TP40002471-SW10>
<http://developer.apple.com/documentation/DeveloperTools/Conceptual/LowLevelABI/Articles/IA32.html#//apple_ref/doc/uid/TP40002492-DontLinkElementID_9>
<http://developer.apple.com/documentation/DeveloperTools/Conceptual/LowLevelABI/Articles/x86_64.html#//apple_ref/doc/uid/TP40005035>
-Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden