This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
newB: How to debug system lib
- From: Russell Shaw <rjshaw at netspace dot net dot au>
- To: gdb at sources dot redhat dot com
- Date: Thu, 14 Oct 2004 14:53:02 +1000
- Subject: newB: How to debug system lib
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)
Also, does gdb need the libc source code files in addition
to the libc6-dbg binaries?