newB: How to debug system lib
Russell Shaw
rjshaw@netspace.net.au
Thu Oct 14 11:56:00 GMT 2004
Hi,
I linked my program with:
gcc -g -O0 -lm -o test main.o
ldd test gives:
libm.so.6 => /usr/lib/debug/libm.so.6 (0x40018000)
libc.so.6 => /usr/lib/debug/libc.so.6 (0x4003a000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
I had: LD_LIBRARY_PATH="/usr/lib/debug"
In gdb, list 'ungetc' (a gnu libc function) gives:
No line number information available for address 0x400af9a0 <ungetc>
I cannot step into the function either.
Is there a way of doing this without statically linking?
(debian 2.6.8.1, libc6 2.3.2.ds1-17, gcc 3.4.2)
More information about the Gdb
mailing list