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条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥50 永磁型步进电机PID算法
    • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
    • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
    • ¥15 如何处理复杂数据表格的除法运算
    • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
    • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
    • ¥200 uniapp长期运行卡死问题解决
    • ¥15 latex怎么处理论文引理引用参考文献
    • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
    • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?