如何使用gdbserver进行远程调试?

时间:2013-05-23 08:44:49

标签: linux gdb arm gdbserver

我有一个程序正在获取段故障。我需要远程调试。 为此,我正在做以下事情:

在目标板上:

#gdbserver :2345 program

在主机x86机器上:

$ arm-linux-gdb -q program
(gdb) target remote 192.168.150.104:2345

但是在执行上述命令后,我收到了很多错误:

Error while mapping shared library sections:
/usr/local/lib/QtTouchScreen/lib/libQtTest.so.4: No such file or directory.
Error while mapping shared library sections:
/usr/local/lib/QtTouchScreen/lib/libQtXml.so.4: No such file or directory.
Error while mapping shared library sections:
/usr/local/lib/QtTouchScreen/lib/libQtGui.so.4: No such file or directory.
Error while mapping shared library sections:
/usr/local/lib/QtTouchScreen/lib/libQtNetwork.so.4: No such file or directory.
Error while mapping shared library sections:
/usr/local/lib/QtTouchScreen/lib/libQtCore.so.4: No such file or directory.
Error while mapping shared library sections:
/lib/libpthread.so.0: No such file or directory.
Error while mapping shared library sections:
/usr/lib/libstdc++.so.6: No such file or directory.
Error while mapping shared library sections:
/lib/libm.so.0: No such file or directory.
Error while mapping shared library sections:
/lib/libgcc_s.so.1: No such file or directory.

我尝试使用export LD_LIBRARY_PATH在主机上设置这些库的路径,但仍然没有运气。

任何帮助都将受到高度赞赏。

此致

Yuvi

1 个答案:

答案 0 :(得分:3)

您需要设置sysroot。如果您在本地提供了库,则可以说:

set sysroot host-pathname
相关问题