我在目標和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