From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6062 invoked by alias); 17 Jun 2003 20:24: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 6047 invoked from network); 17 Jun 2003 20:24:13 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 17 Jun 2003 20:24:13 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h5HKODH20821 for ; Tue, 17 Jun 2003 16:24:13 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h5HKOCI17871; Tue, 17 Jun 2003 16:24:12 -0400 Received: from localhost.localdomain (vpn50-21.rdu.redhat.com [172.16.50.21]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h5HKOBg14140; Tue, 17 Jun 2003 16:24:11 -0400 Received: (from kev@localhost) by localhost.localdomain (8.11.6/8.11.6) id h5HKO6C31424; Tue, 17 Jun 2003 13:24:06 -0700 Date: Tue, 17 Jun 2003 20:24:00 -0000 From: Kevin Buettner Message-Id: <1030617202406.ZM31423@localhost.localdomain> In-Reply-To: "Kris Warkentin" "Re: Why does solib_open do what it does?" (Jun 17, 4:15pm) References: <09c201c33502$da555ce0$0202040a@catdog> <20030617191129.GA15099@nevyn.them.org> <09e801c33504$bd88b420$0202040a@catdog> <1030617200144.ZM31327@localhost.localdomain> <0ab001c3350d$359af2e0$0202040a@catdog> To: "Daniel Jacobowitz" , "Kevin Buettner" , "Kris Warkentin" Subject: Re: Why does solib_open do what it does? Cc: msnyder@redhat.com, "Gdb@Sources.Redhat.Com" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-06/txt/msg00351.txt.bz2 On Jun 17, 4:15pm, Kris Warkentin wrote: > > > That's what I was thinking too. A customer reported that when they > don't > > > set solib-search-path, all of a sudden gdb isn't finding solibs that > used to > > > be found in LD_LIBRARY_PATH. > > > > It sounds to me like the solibs in question were actually being found via > > solib-search-path, not LD_LIBRARY_PATH. > > > > I think the problem with using LD_LIBRARY_PATH is that the paths > > won't be correct without some sort of adjustment. I.e, the paths > > provided by LD_LIBRARY_PATH are target filesystem paths, not host > > paths. > > Well, I've always considered searching LD_LIBRARY_PATH at all to be wrong > since the only util that should be concerned with that is the runtime > loader. Ideally, ld should be filling in the path where it found the lib > which can then be used with solib-absolute-prefix or some such. Right. I think Michael added the searches on $PATH and $LD_LIBRARY_PATH for native ports, but it's not clear to me that these searches are actually needed. Michael, any comments? > > > You think it's okay for me to fix it? > > > > Not yet. I want to study the code some more first. > > > > Actually, the one that bothers me is (2). I think we ought to be doing > > (2) after (3). > > You may be right there. I suppose we want to give the user every > opportunity to override things. I specifically put the target-defined > search function AFTER the solib-search-path lookup for just that reason. If > you're going to move 2, I would say it should be after the target defined > one so that both users and targets get a say before gdb starts looking in > places that could potentially have conflicting solibs. Sure. That sounds right to me. If you want to submit a patch for doing this, that'd be very much appreciated. Thanks, Kevin