【发布时间】:2017-10-08 22:03:40
【问题描述】:
我有一个定制的 ARM 板。它使用 buildroot 生成所有图像。我们正在使用 glibc .. 我需要在 C 库调用中进行调试。当我在 gdb 下使用“Set Verbose On”运行代码时,它会从 libc6.so 中读取符号,但是当我在 C 库调用(例如 fork)上保留断点并运行 info locals/args 时,它说“没有符号信息表”。
我需要重建 GLibc 还是需要任何其他设置..
Reading symbols from /lib/ld-linux-armhf.so.3...done.
Loaded symbols for /lib/ld-linux-armhf.so.3
Reading symbols from /lib/libpthread.so.0...done.
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
(gdb) bt full
#0 0x76e19af0 in fork () from /lib/libc.so.6
No symbol table info available.
#1 0x76dded80 in _IO_proc_open@@GLIBC_2.4 () from /lib/libc.so.6
No symbol table info available.
#2 0x76ddf04c in popen@@GLIBC_2.4 () from /lib/libc.so.6
我的 libc.so 有所有的调试符号。以下是readelf -S libc.so的sn -p
[71] .debug_info PROGBITS 00000000 1277e0 00106b 00 0 0 1
[72] .debug_abbrev PROGBITS 00000000 12884b 0003f7 00 0 0 1
[73] .debug_line PROGBITS 00000000 128c42 0003e2 00 0 0 1
[74] .debug_frame PROGBITS 00000000 129024 002a78 00 0 0 4
[75] .debug_str PROGBITS 00000000 12ba9c 000360 01 MS 0 0 1
[76] .debug_loc PROGBITS 00000000 12bdfc 00162a 00 0 0 1
[77] .debug_ranges PROGBITS 00000000 12d426 0000c0 00 0 0 1
[78] .shstrtab STRTAB 00000000 12d4e6 000528 00 0 0 1
[79] .symtab SYMTAB 00000000 12da10 031700 10 80 10452 4
[80] .strtab STRTAB 00000000 15f110 018ed1 00 0 0 1
【问题讨论】:
标签: linux arm gdb glibc buildroot