系统相关
首页 > 系统相关> > linux-如何使用gdbserver进行远程调试?

linux-如何使用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在放置它们的主机上设置这些库的路径,但是仍然没有运气.

任何帮助将不胜感激.

问候,

尤维

解决方法:

您需要设置sysroot.如果您有本地可用的库,则可以说:

set sysroot host-pathname

标签:gdb,arm,gdbserver,linux
来源: https://codeday.me/bug/20191123/2066258.html