This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[DISCUSS]: cross-debugging shared libraries
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: [DISCUSS]: cross-debugging shared libraries
- From: Michael Snyder <msnyder at redhat dot com>
- Date: Wed, 25 Oct 2000 13:29:30 -0700
- CC: rfolden at cygnus dot com, ebachalo at cygnus dot com, jld at cygnus dot com
- Organization: Red Hat, Inc.
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