【发布时间】:2011-02-08 05:40:21
【问题描述】:
我有一个共享库libtest.so,它将使用dlopen 加载到主程序中。函数test()驻留在libtest.so中,将在主程序中通过dlsym调用。有什么办法可以在test 上设置断点?
请注意,在链接期间主程序尚未链接到libtest.so。否则,我应该能够设置断点,尽管它是一个待处理的操作。就我而言,当我执行b test 时,gdb 会告诉我Function "test" not defined。
【问题讨论】:
-
在用
dlopen加载libtest.so后,你能在test上设置一个断点吗?
标签: debugging gdb shared-libraries breakpoints