From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11802 invoked by alias); 18 Jun 2003 19:16:14 -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 11744 invoked from network); 18 Jun 2003 19:16:13 -0000 Received: from unknown (HELO crack.them.org) (146.82.138.56) by sources.redhat.com with SMTP; 18 Jun 2003 19:16:13 -0000 Received: from dsl093-172-017.pit1.dsl.speakeasy.net ([66.93.172.17] helo=nevyn.them.org ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 19SiQU-00087k-00; Wed, 18 Jun 2003 14:16:58 -0500 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 19SiPZ-0002UO-00; Wed, 18 Jun 2003 15:16:01 -0400 Date: Wed, 18 Jun 2003 19:16:00 -0000 From: Daniel Jacobowitz To: Michael Snyder Cc: Kevin Buettner , Kris Warkentin , "Gdb@Sources.Redhat.Com" Subject: Re: Why does solib_open do what it does? Message-ID: <20030618191600.GB9449@nevyn.them.org> Mail-Followup-To: Michael Snyder , Kevin Buettner , Kris Warkentin , "Gdb@Sources.Redhat.Com" References: <09c201c33502$da555ce0$0202040a@catdog> <20030617191129.GA15099@nevyn.them.org> <09e801c33504$bd88b420$0202040a@catdog> <1030617200144.ZM31327@localhost.localdomain> <0ab001c3350d$359af2e0$0202040a@catdog> <1030617202406.ZM31423@localhost.localdomain> <3EEFAEDB.4090509@redhat.com> <005101c3353c$80077c70$2a00a8c0@dash> <1030618051511.ZM11645@localhost.localdomain> <3EF0B23E.8040406@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3EF0B23E.8040406@redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-06/txt/msg00394.txt.bz2 On Wed, Jun 18, 2003 at 11:41:02AM -0700, Michael Snyder wrote: > You don't think that gdb should honor LD_LIBRARY_PATH in native > debugging, if it is set? Won't the linker-loader honor it? > > I'd be ready to agree that, if solib-search-path is set, > it should override LD_LIBRARY_PATH. But if it isn't set... As far as I'm concerned, the linker should always set the absolute pathname, and we shouldn't be doing any of this junk. I had to reimplement ELF search order a few months ago. It's considerably more complex then what we do here - DT_RPATH for example. > >In fact, for remote debugging, leaving these checks in is rather > >dangerous. If, for some reason, the shared lib is not found via > >either solib-absolute-prefix or solib-search-path, we don't want > >to search paths on the host file system which refer to the hosts > >libraries. If the file is found via one of these paths, it is > >almost certainly wrong, and I've seen cases where this can cause > >wildly unpredictable behavior. (E.g, segfaults on the target, or > >breakpoints being hit at strange places.) > > Agreed. Indeed, I think LD_LIBRARY_PATH is required for native, > and always wrong for cross. Is there any way we can use that > distinction? Maybe with a configure variable? No. Please take a look at PR gdb/633 and the discussion there. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer