From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9305 invoked by alias); 20 Feb 2003 20:18: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 9232 invoked from network); 20 Feb 2003 20:18:08 -0000 Received: from unknown (HELO mx1.redhat.com) (172.16.49.200) by 172.16.49.205 with SMTP; 20 Feb 2003 20:18:08 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h1KKI8N16948 for ; Thu, 20 Feb 2003 15:18:08 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h1KKI7f07722; Thu, 20 Feb 2003 15:18:07 -0500 Received: from localhost.localdomain (vpn50-1.rdu.redhat.com [172.16.50.1]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h1KKI6t23244; Thu, 20 Feb 2003 15:18:07 -0500 Received: (from kev@localhost) by localhost.localdomain (8.11.6/8.11.6) id h1KKI1Y10939; Thu, 20 Feb 2003 13:18:01 -0700 Date: Thu, 20 Feb 2003 20:18:00 -0000 From: Kevin Buettner Message-Id: <1030220201801.ZM10938@localhost.localdomain> In-Reply-To: Paul Koning "Re: GDB honouring RPATH in binaries." (Feb 20, 4:05pm) 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> To: Paul Koning , kevinb@redhat.com Subject: Re: GDB honouring RPATH in binaries. Cc: kewarken@qnx.com, drow@mvista.com, gdb@sources.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-02/txt/msg00450.txt.bz2 On Feb 20, 4:05pm, Paul Koning wrote: > >>>>> "Kevin" == Kevin Buettner writes: > > 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...) Another somewhat more subtle problem is when the user does have solib-absolute-prefix set, but, somehow, a mismatch between the libraries stored in the host's sysroot and the target occurs. It might be useful to compare the bytes in the readonly sections as found on the target and host's sysroot to make sure that the file is likely the same. (I think Daniel J mentioned something about doing a checksum a while back.) Kevin