From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30916 invoked by alias); 30 Jan 2008 21:30:18 -0000 Received: (qmail 30904 invoked by uid 22791); 30 Jan 2008 21:30:18 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 30 Jan 2008 21:29:56 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.14.1/8.14.1) with ESMTP id m0ULTgg2009952; Wed, 30 Jan 2008 22:29:42 +0100 (CET) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.14.1/8.14.1/Submit) id m0ULTglq028051; Wed, 30 Jan 2008 22:29:42 +0100 (CET) Date: Wed, 30 Jan 2008 21:30:00 -0000 Message-Id: <200801302129.m0ULTglq028051@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: eager@eagercon.com CC: pkoning@equallogic.com, gdb@sourceware.org In-reply-to: <47A0E6A2.3040101@eagercon.com> (message from Michael Eager on Wed, 30 Jan 2008 13:05:38 -0800) Subject: Re: Finding ld.so dynamic loader References: <47A0A8D8.7090508@eagercon.com> <200801301827.m0UIRbv7029099@brahms.sibelius.xs4all.nl> <47A0C5A1.7090608@eagercon.com> <18336.51719.355382.325696@pkoning-laptop.equallogic.com> <47A0E6A2.3040101@eagercon.com> Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-01/txt/msg00349.txt.bz2 > Date: Wed, 30 Jan 2008 13:05:38 -0800 > From: Michael Eager > > Paul Koning wrote: > >>>>>> "Michael" == Michael Eager writes: > > > > Michael> Mark Kettenis wrote: > > >> GDB tries to please them all, and still tries to cover the case of > > >> a native debugger too. > > > > Michael> It still seems that searching the host file system should be > > Michael> the last choice, not the first. > > > > It should either be the last choice, or not be done at all. An > > example where it should not be done at all is when host and target are > > different architectures. Looking up a symbol in an x86 library when > > you're debugging a MIPS target cannot ever be correct -- but that's > > what can happen today. (This is also an example of something that can > > easily be checked by the solib code without worrying about the > > "remote" vs. "local" distinction -- if host != target then by > > definition the host libraries are wrong.) > > It's certainly incorrect to look up a symbol when the host > and target architectures are different. But it's also > incorrect when the architectures are the same but the library > versions are different. For example, debugging a x86 Linux 2.4 > target with an x86 Linux 2.6 host. I'd rather see a fix which > handles both situations. Bad example; Linux kernel versions have very little to do with this and if both systems use the same userland things would work fine. > Essentially, any time gdb is working with a remote target, > searching the host file system should be suppressed. I'm not sure everybody would agree with you here, although one could argue that if people would want to search the host filesystem in this case, they can always set solib-absolute-prefix and/or solib-search-path.