From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16714 invoked by alias); 18 Jun 2003 18:52:44 -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 13337 invoked from network); 18 Jun 2003 18:50:53 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 18 Jun 2003 18:50:53 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h5IIoqH22674 for ; Wed, 18 Jun 2003 14:50:52 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h5IIokS26345; Wed, 18 Jun 2003 14:50:46 -0400 Received: from redhat.com (reddwarf.sfbay.redhat.com [172.16.24.50]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id h5IIojK14319; Wed, 18 Jun 2003 11:50:45 -0700 Message-ID: <3EF0B485.6050805@redhat.com> Date: Wed, 18 Jun 2003 18:52:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kris Warkentin CC: Kevin Buettner , Daniel Jacobowitz , "Gdb@Sources.Redhat.Com" Subject: Re: Why does solib_open do what it does? 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> <003301c33594$3e6bccf0$2a00a8c0@dash> <008e01c335ab$72a101e0$0202040a@catdog> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-06/txt/msg00391.txt.bz2 Kris Warkentin wrote: > I believe the comment does not accurately reflect the code. Here is my > proposal for the new comment using the search algorithm rather than search > order: > > Search algorithm: > * If there is a solib_absolute_prefix and path is absolute: > * Search for solib_absolute_prefix/path. > * else > * Look for it literally (unmodified). > * Look in SOLIB_SEARCH_PATH. I'm not sure -- but do you think it should be /SOLIB_ABSOLUTE_PREFIX/SOLIB_SEARCH_PATH? Or maybe both? > * If available, use target defined search function. > * Look in inferior's $PATH. > * Look in inferior's $LD_LIBRARY_PATH. I rather think that $PATH and $LD_LIBRARY_PATH should be native-only. But come to think of it, do remote targets even have environment variables? And if so -- do they inherit them from gdb / the host? If there's a gdbserver-type situation, and if the server is able to provide the true environment variables from the target, then yes, we should use these. But I don't recall any gdbserver ever offering that functionality. > The code seems to make the meaning of solib_ABSOLUTE_prefix somewhat more > literal. I think it's supposed to be literal. > It's only used if the path is absolute. Then the question is, do > we think this is correct? Should we be searching literally at this point or > defer that until later? > > cheers, > > Kris > > >