gpt4 book ai didi

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

转载 作者:太空狗 更新时间:2023-10-29 11:09:43 27 4
gpt4 key购买 nike

我有一个程序出现段错误。我需要远程调试它。为此,我正在执行以下操作:

在目标板上:

#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

关于linux - 如何使用 gdbserver 进行远程调试?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16709368/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com