[DISCUSS]: cross-debugging shared libraries
Michael Snyder
msnyder@redhat.com
Wed Oct 25 13:29:00 GMT 2000
Assuming that Kevin Bittner's recent overhaul of solib.c
gets me past the major coding difficulties of getting
shared library support working in a cross-debugging
environment, I'll soon be facing a minor design issue.
Suppose I'm running GDB on a solaris box and debugging
a linux program via the remote protocol and gdbserver.
Suppose I detect that the remote program has loaded a
new shared library.
That shared library will not be on my local disk, unles
I have explicitly created a local directory that mirrors
the shared library directories on the foreign system.
If I do that, then there will be some prefix that I
have to prepend onto the path to locate the copy of
the shared library, eg:
/home/msnyder/foreign/usr/lib/libc.so.1
So I can tell GDB about this prefix by several means:
1) A gdb "set" command, eg:
(gdb) set GDB_LD_LIBRARY_PATH /home/msnyder/foreign
2) An environment variable:
% setenv GDB_LD_LIBRARY_PATH /home/msnyder/foreign
3) Other?
Does anybody have any opinions?
Michael
More information about the Gdb-patches
mailing list