From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21962 invoked by alias); 21 Feb 2003 15:32:10 -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 21910 invoked from network); 21 Feb 2003 15:32:09 -0000 Received: from unknown (HELO hub.ott.qnx.com) (209.226.137.76) by 172.16.49.205 with SMTP; 21 Feb 2003 15:32:09 -0000 Received: from smtp.ott.qnx.com (smtp.ott.qnx.com [10.0.2.158]) by hub.ott.qnx.com (8.9.3/8.9.3) with ESMTP id KAA10134; Fri, 21 Feb 2003 10:20:19 -0500 Received: from catdog ([10.4.2.2]) by smtp.ott.qnx.com (8.8.8/8.6.12) with SMTP id KAA17260; Fri, 21 Feb 2003 10:32:08 -0500 Message-ID: <00e001c2d9be$616ca940$0202040a@catdog> From: "Kris Warkentin" To: "Daniel Jacobowitz" , "Paul Koning" Cc: , References: <0db801c2d914$78f80a50$0202040a@catdog> <1030220193301.ZM10611@localhost.localdomain> <20030220194049.GA19653@nevyn.them.org> <001301c2d918$894ef1d0$0202040a@catdog> <20030220194852.GA20424@nevyn.them.org> <002701c2d919$d07edce0$0202040a@catdog> <1030220195833.ZM10783@localhost.localdomain> <15957.17196.501000.893848@gargle.gargle.HOWL> <20030220201032.GA21694@nevyn.them.org> Subject: Re: GDB honouring RPATH in binaries. Date: Fri, 21 Feb 2003 15:32:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-SW-Source: 2003-02/txt/msg00462.txt.bz2 > > Kevin> For remote targets, you must have solib-absolute-prefix set. > > Kevin> Searching host libraries (whether found via RPATH or some > > Kevin> other means) is almost invariably wrong. > > > > I'd omit "almost". In fact, it would be useful if gdb could complain > > for a remote debug when solib-absolute-prefix isn't set. That would > > eliminate a lot of confusion when people forget to set it. When > > debugging MIPS code, gdb is perfectly happy to load shared file symbol > > tables from /usr/lib, even though those are x86 binaries! The result > > is utter chaos, of course. It would be helpful if gdb prevented that > > sort of simple user error. (I suppose another way to avoid that is to > > have gdb check that the shared library it's examining is at least > > meant for the same processor family, and I suppose the same > > endianness...) > > Yeah, I used to see this a lot too (until we made solib-absolute-prefix > automatic in our tools). Unfortunately there is no clear hook to > figure out if a target is remote or local; and a lot of people actually > do use gdbserver to talk to localhost... and then there's no way to > know if it's the same root or not. Aha. Looks like our loader just fills in the basename of the lib it finds. That explains why we need so much initialization of solib-search-path and so on. I'm going to get our kernel guy to change that so that we can just use solib-absolute-prefix. cheers, Kris