specifying the library path
Baurjan Ismagulov
ibr@ata.cs.hun.edu.tr
Fri Dec 12 16:27:00 GMT 2003
Hello,
how do I use a library from a different directory under gdb?
As I understand from the following page, gdb should use the inherited
LD_LIBRARY_PATH value:
http://lists.debian.org/debian-devel/2003/debian-devel-200301/msg01338.html
Here is what I am doing:
$ export LD_LIBRARY_PATH=/z
$ ldd /sbin/blogd
libutil.so.1 => /lib64/libutil.so.1 (0x0000002a9566d000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000002a95770000)
libc.so.6 => /z/libc.so.6 (0x0000002a9588c000)
/lib64/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x0000002a95556000)
$ /usr/ibr/src/gdb-6.0/gdb/gdb /sbin/blogd /core
GNU gdb 6.0
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "x86_64-unknown-linux-gnu"...
Core was generated by `/sbin/blogd /dev/ttyS0'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib64/libutil.so.1...done.
Loaded symbols for /lib64/libutil.so.1
Reading symbols from /lib64/libpthread.so.0...done.
Loaded symbols for /lib64/libpthread.so.0
Reading symbols from /lib64/libc.so.6...done.
Loaded symbols for /lib64/libc.so.6
Reading symbols from /lib64/ld-linux-x86-64.so.2...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
#0 0x0000002a958f6df4 in fileno_unlocked () from /lib64/libc.so.6
For now, I'm replacing the library in /lib64, but this is somewhat
inconvenient for libc...
Thanks in advance,
Baurjan.
More information about the Gdb
mailing list