GDB Objective-c调试(无符号表)
我有一个可执行文件,我正在使用 gdb 对其进行调试。这是我第一次使用 gdb,所以请耐心等待。
我想在函数处设置断点,并且我使用类转储知道该函数的名称。现在它不允许我向该函数添加断点,因为它说没有符号表。我尝试添加符号表,但它仍然抱怨没有加载符号表。
那么,我可以在这个方法上设置断点吗?这是一个客观的 c 方法,而不是 c (如果这有区别的话)。我需要做的就是检查这个方法的参数。
I have an executable and I am debugging it using gdb. This is my first time using gdb so bear with me please.
I want to set a breakpoint at a function and I know the name of the function using class dump. Now it won't let me add breakpoint to that function because it say's that there's no symbol table. I tried adding the symbol table but it still complains that no symbol table loaded.
So, is there's anyway I can set a breakpoint at this method? It's an objective c method, not c (If that makes a difference). All I need to do is examine the argument of this method.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在类转储中,有一个 -A 选项可以打印函数的地址,例如,
您可以使用该地址设置断点:
请注意,除非您已经剥离了可执行文件,否则您应该始终可以设置断点使用方法的名称
(地址不同,因为后者会跳过一些帧设置代码。)
In class-dump there is an -A option will can print the function's address, e.g.
With this you can set a break point using the address:
Note that, unless you have stripped the executable, you should always be possible to set a break point using the method's name
(The address isn't the same as the latter skips some frame set-up code.)