Say you’re in gdb, and about to execute a call
instruction for dyld_stub_objc_msgSend
, how do you know what’s about to happen?
On i386
(gdb) x/s *(SEL*)($esp+4)
tells you the message that’s about to be sent.
(gdb) po *(id*)$esp
tells you the target object that’s about to get the message.