Re: gdb objc_msgSend: trace messages
Re: gdb objc_msgSend: trace messages
- Subject: Re: gdb objc_msgSend: trace messages
- From: MarketLogix Developer <email@hidden>
- Date: Sun, 30 Mar 2003 09:40:06 -0800
Well, from what I remember, you plug a SEL into sel_getName() to get
the string name of the method that
the selector hashes to. a SEL is most commonly returned via
@selector("methodName") but this is a
preprocessor directive and so obviously not callable from within the
debugger. There are also functions
somewhere in the runtime, I believe, that can return/verify selectors
and/or IMPs but I can't recall the names
right now.
On Saturday, March 29, 2003, at 12:59 PM, Seth Delackner wrote:
Google knows that in the olden NeXT days, this was possible:
(gdb) b objc_msgSend
Breakpoint 2 at 0x5002230
(gdb) comm 2
printf "%c[%s %s]\n",(((*((**(int***)($sp+4))+4))&2)?'+':'-'),
(char*)(*((**(int ***)($sp+4))+2)),(char*)sel_getName(*(int*)($sp+8))
And you would see the full output like:
-[Object message:]
I never used NeXT, but I tried this on OS X, and while the second
argument (to generate the object or class name) still works, the
argument to sel_getName produces gibberish.
Anyone know the answer to what goes in sel_getName(mystery) ?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
-----------------------------------------------
bisk ~ OSX.2.4
G4 PowerMac Gigabit, Dual 500
Sony SDM-M81 18.1" LCD display
1GB, 40GB, SuperDrive(DVR 105)
HP "All-in-One" d135 BubbleJet
-----------------------------------------------
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.