如何使用gdb链接linux,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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值