From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16286 invoked by alias); 13 Nov 2002 22:57:55 -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 16279 invoked from network); 13 Nov 2002 22:57:55 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 13 Nov 2002 22:57:55 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18C6SE-00061S-00; Wed, 13 Nov 2002 16:57:50 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18C6TR-00039N-00; Wed, 13 Nov 2002 17:59:05 -0500 Date: Wed, 13 Nov 2002 14:57:00 -0000 From: Daniel Jacobowitz To: Paul Koning Cc: gp@qnx.com, gdb@sources.redhat.com Subject: Re: set env affects host? Message-ID: <20021113225905.GA11998@nevyn.them.org> Mail-Followup-To: Paul Koning , gp@qnx.com, gdb@sources.redhat.com References: <15826.54940.676306.297836@pkoning.dev.equallogic.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15826.54940.676306.297836@pkoning.dev.equallogic.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2002-11/txt/msg00157.txt.bz2 On Wed, Nov 13, 2002 at 05:47:56PM -0500, Paul Koning wrote: > >>>>> "Graeme" == Graeme Peterson writes: > > Graeme> Well, I think I have answered my own question by checking in > Graeme> the source. I found a comment in solib.c for solib_open that > Graeme> says that solib symbols are found in the inferior's > Graeme> LD_LIBRARY_PATH, and never in the host's. So I guess that is > Graeme> that. :-) > > Graeme> Search order: * If path is absolute, look in > Graeme> SOLIB_ABSOLUTE_PREFIX. * If path is absolute or relative, > Graeme> look for it literally (unmodified). * Look in > Graeme> SOLIB_SEARCH_PATH. * Look in inferior's $PATH. * Look in > Graeme> inferior's $LD_LIBRARY_PATH. > > Graeme> Anyone care to comment on the rationale behind the behavior? > Graeme> Clearly it seemed reasonable to me to find the solibs for > Graeme> symbols in the host's LD_LIBRARY_PATH, but that is wrong. > > Looking in the host LD_LIBRARY_PATH, or for that matter using absolute > names literally, is likely to be wrong for cross-debugging. > Fortunately the literal lookup is not the first thing tried, but as > far as I'm concerned it might as well go away entirely if host != > target. I think that was the consensus the last time this came up: cross debuggers should only do some of those. Check the large discussion resulting from gdb/633. Either local/remote or native/cross should control this; someone just needs to decide the exact behavior and implement it :) -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer