From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14276 invoked by alias); 19 May 2005 16:50:57 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 12973 invoked from network); 19 May 2005 16:49:26 -0000 Received: from unknown (HELO lakermmtao07.cox.net) (68.230.240.32) by sourceware.org with SMTP; 19 May 2005 16:49:26 -0000 Received: from white ([68.9.64.121]) by lakermmtao07.cox.net (InterMail vM.6.01.04.00 201-2131-118-20041027) with ESMTP id <20050519164925.BITE28809.lakermmtao07.cox.net@white> for ; Thu, 19 May 2005 12:49:25 -0400 Received: from bob by white with local (Exim 3.35 #1 (Debian)) id 1DYoD7-0007BJ-00 for ; Thu, 19 May 2005 12:49:25 -0400 Date: Thu, 19 May 2005 16:50:00 -0000 From: Bob Rossi To: GDB Subject: Re: environment variables in CLI Message-ID: <20050519164925.GC26748@white> Mail-Followup-To: GDB References: <20050519162310.GA26748@white> <20050519162543.GA23073@nevyn.them.org> <20050519164311.GB26748@white> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050519164311.GB26748@white> User-Agent: Mutt/1.3.28i X-SW-Source: 2005-05/txt/msg00197.txt.bz2 On Thu, May 19, 2005 at 12:43:11PM -0400, Bob Rossi wrote: > 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. I just tried this with gdb 6.3 and get the same problems. Bob Rossi