【发布时间】:2022-01-11 13:50:32
【问题描述】:
当我使用 GDB 附加到进程时,我看到了警告:
Reading symbols from /CloneFileSystem/lib/ld-uClibc.so.0...
(No debugging symbols found in /CloneFileSystem/lib/ld-uClibc.so.0)
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
即使我使用 set sysroot /CloneFileSystem 和那里的所有库,也无济于事。
我的进程调用共享库中的函数以及该函数调用另一个共享库中的另一个函数。
例如 ProcessFunc-> Lib1Func -> Lib2Func
我想调试 Lib2Func 但是当我运行命令时
b Lib2Func
gdb can't set a breakpoint there event that library is already loaded
file myexe -> interpreter /lib/ld-uClibc.so.0
当我在 GDB 中使用 info sharedlibrary 时,我不能在 From 和 To 中输入值(加载的地址为空)
【问题讨论】:
-
您克隆的 sysroot 中是否有动态加载程序(ld.so 或 ld-linux.so 或其他)?运行
file ./myexe以查看为./myexe指定的动态加载程序。 -
@n.1.8e9-where's-my-sharem。当我在这个 exe 上运行
file时,我得到了interpreter /lib/ld-uClibc.so.0并且我在lib中有这个文件(我更新了我的帖子)
标签: linux debugging gdb shared-libraries