From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15854 invoked by alias); 17 Jun 2003 20:15:26 -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 15845 invoked from network); 17 Jun 2003 20:15:25 -0000 Received: from unknown (HELO hub.ott.qnx.com) (209.226.137.76) by sources.redhat.com with SMTP; 17 Jun 2003 20:15:25 -0000 Received: from smtp.ott.qnx.com (smtp.ott.qnx.com [10.0.2.158]) by hub.ott.qnx.com (8.9.3p2/8.9.3) with ESMTP id QAA29113; Tue, 17 Jun 2003 16:08:45 -0400 Received: from catdog ([10.4.2.2]) by smtp.ott.qnx.com (8.8.8/8.6.12) with SMTP id QAA30762; Tue, 17 Jun 2003 16:15:24 -0400 Message-ID: <0ab001c3350d$359af2e0$0202040a@catdog> From: "Kris Warkentin" To: "Kevin Buettner" , "Daniel Jacobowitz" Cc: "Gdb@Sources.Redhat.Com" References: <09c201c33502$da555ce0$0202040a@catdog> <20030617191129.GA15099@nevyn.them.org> <09e801c33504$bd88b420$0202040a@catdog> <1030617200144.ZM31327@localhost.localdomain> Subject: Re: Why does solib_open do what it does? Date: Tue, 17 Jun 2003 20:15:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-SW-Source: 2003-06/txt/msg00350.txt.bz2 > > 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. > > 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. cheers, Kris