This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[DISCUSS]: cross-debugging shared libraries


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]