From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15774 invoked by alias); 20 Feb 2003 20:03: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 15761 invoked from network); 20 Feb 2003 20:03:26 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by 172.16.49.205 with SMTP; 20 Feb 2003 20:03:26 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18lynq-0001bH-00; Thu, 20 Feb 2003 16:04:26 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18lwuc-0005XE-00; Thu, 20 Feb 2003 15:03:18 -0500 Date: Thu, 20 Feb 2003 20:03:00 -0000 From: Daniel Jacobowitz To: Kris Warkentin Cc: Kevin Buettner , gdb@sources.redhat.com Subject: Re: GDB honouring RPATH in binaries. Message-ID: <20030220200318.GA21259@nevyn.them.org> Mail-Followup-To: Kris Warkentin , Kevin Buettner , gdb@sources.redhat.com References: <0db801c2d914$78f80a50$0202040a@catdog> <1030220193301.ZM10611@localhost.localdomain> <000701c2d918$02918950$0202040a@catdog> <1030220195520.ZM10742@localhost.localdomain> <003d01c2d91a$974231b0$0202040a@catdog> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <003d01c2d91a$974231b0$0202040a@catdog> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-02/txt/msg00443.txt.bz2 On Thu, Feb 20, 2003 at 02:59:34PM -0500, Kris Warkentin wrote: > > > > With regard to the remote case, I would have thought that simply > > > > prepending solib-absolute-prefix would give the correct results. > > > > > > Well, let's say I upload my program and libs to /tmp on the remote with > the > > > binary's RPATH set to /tmp. I'm debugging on Cygwin in > /home/kewarken/test. > > > My solib-absolute-prefix and solib-search-path are based in > > > c:\QNXsdk\target\qnx6 (where all the libs are stored). This is why I'm > not > > > convinced that there's any nice way to use RPATH in the remote case. > > > > I see what you mean. Unless you're using an NFS mount, it's unlikely > > for the sys-root on the host to contain the stuff you've just uploaded > > to /tmp. > > > > In this case, I think it would make sense to use solib-search-path > > to find the libraries that you've uploaded to /tmp. > > Yes. This is really just a case of trying to automate this so that the user > has less trouble. You have no idea how many tech support calls we get which > are solved by, "make sure that gdb can find everything it needs". From what > I understand, RPATH is supposed to be THE ordained way of making sure that > the linker can find it's libs so perhaps we need to add one more case to > solib_open() where it looks through RPATH. I'm thinking that it can't hurt > and might help. Certainly it will be helpful on native debuggers. Certainly it should _NOT_ be helpful on native debuggers. By the time GDB is loading a shared library, the dynamic linker has resolved it to a full path. This should always be the case; I don't want to duplicate the path resolution logic of a hundred quirky OS versions in GDB. We shouldn't need to search RPATH. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer