From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1362 invoked by alias); 3 Aug 2005 17:06:49 -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 1003 invoked by uid 22791); 3 Aug 2005 17:06:21 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 03 Aug 2005 17:06:21 +0000 Received: from drow by nevyn.them.org with local (Exim 4.52) id 1E0Mh8-0003DI-OZ; Wed, 03 Aug 2005 13:06:18 -0400 Date: Wed, 03 Aug 2005 17:06:00 -0000 From: Daniel Jacobowitz To: Paul Koning Cc: gdb@sources.redhat.com Subject: Re: solib search algorithm for cross-gdb Message-ID: <20050803170618.GA12169@nevyn.them.org> Mail-Followup-To: Paul Koning , gdb@sources.redhat.com References: <17136.51402.673936.895045@gargle.gargle.HOWL> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17136.51402.673936.895045@gargle.gargle.HOWL> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-08/txt/msg00017.txt.bz2 On Wed, Aug 03, 2005 at 09:38:18AM -0400, Paul Koning wrote: > Currently, the shared library search in solib.c first tries to use the > shared lib filename as given (if solib-absolute-prefix isn't set). > > That's exactly right for a native gdb, but it is in general the wrong > answer for a cross-gdb. If I'm debugging a mips box, or analyzing a > mips corefile, resolving shared lib symbols from intel shared libs in > my /usr/lib is the wrong thing. > > .gdbinit helps, but not everyone remembers to do this right every > time. > > I was thinking about having the case of "use the filename exactly as > supplied" in solib.c be used only in native gdb. That seems to > require adding stuff in configure and config.in to tell a native from > a cross build. > > I could submit this patch if it sounds like a good feature (otherwise > I'll probably keep it as a private change). Comments? Better ways to > do this? There's an argument that this should be based primarily on the target. Using the native files is generally right for target "child"; generally wrong (though not necessarily) for target "remote"; and generally right for target "core" iff this is a native GDB. I don't know if that's worth implementing. I'm inclined to say that your suggestion is progress, at least. -- Daniel Jacobowitz CodeSourcery, LLC