This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: environment variables in CLI
On Thu, May 19, 2005 at 12:25:43PM -0400, Daniel Jacobowitz wrote:
> On Thu, May 19, 2005 at 12:23:10PM -0400, Bob Rossi wrote:
> > Hi,
> >
> > I'm trying to figure out how to set the LD_LIBRARY_PATH in GDB once I
> > start it up. The command 'set environment
> > LD_LIBRARY_PATH=/home/foo/lib' works. However, I want to do something
> > like 'set environment LD_LIBRARY_PATH=$SOME_PATH/lib:$LD_LIBRARY_PATH'.
> > Is this possible from the CLI?
>
> Nope.
OK, I suppose this could be a nice feature. Do you think it would be
terribly complicated?
> > Actually, I couldn't figure out how to tell GDB where to look for shared
> > objects, that's why I ended up using the LD_LIBRARY_PATH.
>
> set solib-search-path? set solib-absolute-prefix? What are you trying
> to do?
Well, I'm probably just messing things up. Here's what I have. The .so's
are in /home/foo/lib. libqt.so is definatly there.
(gdb) set solib-search-path /home/foo/lib
(gdb) b main
r
Breakpoint 1 at 0x80af805: file main.cpp, line 469.
(gdb) r
main-program: error while loading shared libraries: libqt.so: cannot open shared object file: No such file or directory
Program exited with code 0177.
(gdb) set solib-search-path /home/foo/lib
(gdb) r
main-program: error while loading shared libraries: libqt.so: cannot open shared object file: No such file or directory
Program exited with code 0177.
(gdb)
However, If I set the LD_LIBRARY_PATH it works. I'm using GDB 6.1 which
is rather old. I suppose I should upgrade.
Bob Rossi