From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10028 invoked by alias); 9 Aug 2002 23:12:18 -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 10016 invoked from network); 9 Aug 2002 23:12:16 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 9 Aug 2002 23:12:16 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id g79Mwvl05089; Fri, 9 Aug 2002 18:58:57 -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 g79NCDu08970; Fri, 9 Aug 2002 19:12:14 -0400 Received: from romulus.sfbay.redhat.com (remus.sfbay.redhat.com [172.16.27.252]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id g79NCCe04684; Fri, 9 Aug 2002 16:12:12 -0700 Received: (from kev@localhost) by romulus.sfbay.redhat.com (8.11.6/8.11.6) id g79NC6911776; Fri, 9 Aug 2002 16:12:06 -0700 Date: Fri, 09 Aug 2002 16:12:00 -0000 From: Kevin Buettner Message-Id: <1020809231206.ZM11775@localhost.localdomain> In-Reply-To: Daniel Jacobowitz "Re: gdb/633: fully qualified pathnames in solib_map_sections() and remote debugging" (Aug 6, 9:20am) References: <20020806100634.11483.qmail@sources.redhat.com> <20020806132047.GA16450@nevyn.them.org> To: Daniel Jacobowitz , jorma.laaksonen@hut.fi Subject: Re: gdb/633: fully qualified pathnames in solib_map_sections() and remote debugging Cc: gdb-gnats@sources.redhat.com, gdb@sources.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-08/txt/msg00084.txt.bz2 On Aug 6, 9:20am, Daniel Jacobowitz wrote: > Global variable SOLIB_ABSOLUTE_PREFIX is used as a prefix directory > to search for shared libraries if they have an absolute path. > > Global variable SOLIB_SEARCH_PATH is used as a prefix directory > (or set of directories, as in LD_LIBRARY_PATH) to search for all > shared libraries if not found in SOLIB_ABSOLUTE_PREFIX. > > Search order: > * If path is absolute, look in SOLIB_ABSOLUTE_PREFIX. > * If path is absolute or relative, look for it literally (unmodified). > * Look in SOLIB_SEARCH_PATH. > * Look in inferior's $PATH. > * Look in inferior's $LD_LIBRARY_PATH. > > > I think the search order needs some revision though: > - A cross debugger should not search $PATH or $LD_LIBRARY_PATH I agree with this. > - A cross debugger may, or may not, want to look for the unmodified > path; I suspect that we only want to look for unmodified relative > paths, not unmodified absolute ones. I agree regarding absolute paths. For relative paths, I'm not convinced that it's all that useful to look at the unmodified path. (Doing so requires that you have your cwd set correctly, right?) > With those changes you would have to explicitly specify the path to > DSOs in a cross debugger via solib-absolute-prefix and > solib-search-path, I think this would be good... > and GDB would stop picking up the host libpthread.so > and making gdbserver segfault... ...and this too! Kevin