我在目标和CodeSourcery IDE上使用gdbserver。我的硬件是一个omap3530的软件。使用gdbserver调试共享库
我可以在主应用程序中单步执行代码,但是如果我尝试进入共享库中的函数,我会获取内存地址并终止调试器。
这是我的图书馆被编译并复制到目标系统上的/ lib文件夹。(它确实有调试符号)我已经尝试使用.gbdinit文件设置solib绝对前缀/ lib目录
下面是从gdb的跟踪警告:
903,056 13-gdb-set sysroot-on-target /lib
903,065 13^done
903,065 (gdb)
903,065 14-target-select remote 192.168.1.101:2345
903,114 =thread-group-started,id="i1",pid="42000"
903,114 =thread-created,id="1",group-id="i1"
903,115 15-list-thread-groups --available
903,120 16-list-thread-groups
903,128 &"warning: Unable to find dynamic linker breakpoint function.\nGDB will be unable to debug shared library initializers\nand track explicitly loaded dynamic code."
903,128 &"\n"
导致
903,395 &"Error while mapping shared library sections:\n"
903,397 &"/lib/libCoreLib.so: Invalid argument.\n"
903,399 =library-loaded,id="/lib/libCoreLib.so",target-name="/lib/libCoreLib.so",hostname="/lib/libCoreLib.so",low-address="0x0",high-address="0x0",symbols-loaded="0",thread-group="i1"
看看这篇文章是否有所帮助:http://www.fayewilliams.com/2013/01/31/gdb-unable-to-find-dynamic-linker-breakpoint-function/ – 2013-02-06 05:29:56