wgco123 2019-06-28 10:56
浏览 1820

GDB远程调试warning: Could not load shared library symbols for /lib/libc.so.6.

问题描述:
DGB不能远程调试。
* 使用的交叉编译工具:gcc 版本 4.7.3 20130226 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2013.03-20130313 - Linaro GCC 2013.03)
* C代码: 简单的HelloWorld!
#include

int main(){
printf("Hello World!");
return 0;
}
* 编译: arm-linux-gnueabihf-gcc -g main.c -o remote_debug
* 将编译好的二进制文件remote_debug拷贝到ARM下,尝试运行程序:./remote_debug,没有问题。启动调试 :gdbserver :6666 remote_debug,到这里一切正常,ARM板提示监听6666端口。
* Ubnutu下启动GDB客户端:arm-linux-gnueabihf-gdb remote_debug
* 下面是GDB操作过程:
GNU gdb (crosstool-NG linaro-1.13.1-4.7-2013.03-20130313 - Linaro GCC 2013.03) 7.5-2012.12
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-build_pc-linux-gnu --target=arm-linux-gnueabihf".
For bug reporting instructions, please see:
https://bugs.launchpad.net/gcc-linaro...
Reading symbols from /home/wgco/qtwork/remote_debug/remote_debug...done.

(gdb) target remote 192.168.0.200:6666

Remote debugging using 192.168.0.200:6666
Reading symbols from /usr/local/arm/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/libc/lib/ld-linux-armhf.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/local/arm/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/libc/lib/ld-linux-armhf.so.3
0x40000c80 in ?? ()
from /usr/local/arm/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/libc/lib/ld-linux-armhf.so.3

(gdb) c

Continuing.
warning: Could not load shared library symbols for /lib/libc.so.6.
Do you need "set solib-search-path" or "set sysroot"?

Program received signal SIGILL, Illegal instruction.
0x4000270c in ?? ()
from /usr/local/arm/gcc-linaro-arm-linux-gnueabihf-4.7-2013.03-20130313_linux/arm-linux-gnueabihf/libc/lib/ld-linux-armhf.so.3

(gdb) q

A debugging session is active.

Inferior 1 [process 906] will be killed.

Quit anyway? (y or n) y

  • 根据以上信息,有一条警告warning: Could not load shared library symbols for /lib/libc.so.6. 。但是在ARM板的/lib/目录下是有libc.so.6这个文件的,不知道为什么调试的时候不能加载?
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 #MATLAB仿真#车辆换道路径规划
    • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
    • ¥15 数据可视化Python
    • ¥15 要给毕业设计添加扫码登录的功能!!有偿
    • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
    • ¥15 微信公众号自制会员卡没有收款渠道啊
    • ¥100 Jenkins自动化部署—悬赏100元
    • ¥15 关于#python#的问题:求帮写python代码
    • ¥20 MATLAB画图图形出现上下震荡的线条
    • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘