lldb objc_msgSend tracing on OS X

家住魔仙堡 提交于 2019-11-29 12:46:12

The command you quote above is only correct for iOS Simulator apps which run as i386 processes on the Mac. $esp+4 means the first argument, $esp+8 means the second argument passed in the i386 ABI. On x86_64 and arm, the first few arguments are passed in registers with the $arg1, $arg2 convenience names. So try

p (void)printf("[%s, %s]\n", (char*)object_getClassName($arg1), $arg2)

for arm/x86_64 architectures. (of course, p is an alias for expr -- here - same thing, just less typing.)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!