From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7005 invoked by alias); 13 Nov 2002 22:47:59 -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 6996 invoked from network); 13 Nov 2002 22:47:58 -0000 Received: from unknown (HELO cygnus.equallogic.com) (65.170.102.10) by sources.redhat.com with SMTP; 13 Nov 2002 22:47:58 -0000 Received: from cygnus.equallogic.com (localhost.localdomain [127.0.0.1]) by cygnus.equallogic.com (8.11.6/8.11.6) with ESMTP id gADMlvW12917 for ; Wed, 13 Nov 2002 17:47:57 -0500 Received: from deneb.dev.equallogic.com (deneb.dev.equallogic.com [172.16.1.99]) by cygnus.equallogic.com (8.11.6/8.11.6) with ESMTP id gADMlv512908; Wed, 13 Nov 2002 17:47:57 -0500 Received: from pkoning.dev.equallogic.com.equallogic.com (localhost.localdomain [127.0.0.1]) by deneb.dev.equallogic.com (8.11.6/8.11.6) with ESMTP id gADMluW10916; Wed, 13 Nov 2002 17:47:57 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15826.54940.676306.297836@pkoning.dev.equallogic.com> Date: Wed, 13 Nov 2002 14:47:00 -0000 From: Paul Koning To: gp@qnx.com CC: gdb@sources.redhat.com Subject: Re: set env affects host? References: X-SW-Source: 2002-11/txt/msg00156.txt.bz2 >>>>> "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. paul