我有一个定制的ARM板。 它使用buildroot生成所有映像。 我们正在使用glibc ..我需要在C库调用中进行调试。 当我使用“ Set Verbose On”在gdb下运行代码时,它会从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的片段
[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