From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18576 invoked by alias); 4 Oct 2004 19:00:08 -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 18567 invoked from network); 4 Oct 2004 19:00:06 -0000 Received: from unknown (HELO capitol.mail.pas.earthlink.net) (207.217.120.180) by sourceware.org with SMTP; 4 Oct 2004 19:00:06 -0000 Received: from ip216-26-76-19.dsl.du.teleport.com ([216.26.76.19] helo=stray.canids) by capitol.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 1CEY46-0002AA-00 for gdb@sources.redhat.com; Mon, 04 Oct 2004 12:00:06 -0700 Received: from stray.canids (localhost.localdomain [127.0.0.1]) by stray.canids (Postfix) with ESMTP id 90149502AB6 for ; Mon, 4 Oct 2004 12:00:03 -0700 (PDT) From: Felix Lee To: gdb list Subject: Re: gdbserver, sysroot, prelink References: <20041004173736.1EA97502AB6@stray.canids> <20041004175148.GA16251@nevyn.them.org> In-Reply-To: <20041004175148.GA16251@nevyn.them.org> on Mon, 04 Oct 2004 13:51:48 EDT from Daniel Jacobowitz Date: Mon, 04 Oct 2004 19:05:00 -0000 Message-Id: <20041004190003.90149502AB6@stray.canids> X-SW-Source: 2004-10/txt/msg00054.txt.bz2 Daniel Jacobowitz : > How does this make --with-sysroot useless? That's exactly what sysroot > is supposed to do - point it where you keep the exact libraries of the > machine. I usually point it to an NFS server. doesn't that assume you only have one such target machine in your installation? in most setups I can think of, the sysroot symlink has to be created by hand by the end-user of gdb, since he's the one who decides what remote machine he's using. I can't think of a reasonable way for a packager or an installer to create a default sysroot, since there's no place to tell gdb to use a default remote machine. so the gdb user might as well set solib-absolute-prefix in his gdbinit, since that doesn't require installation privs. this problem is specific to gdb. gcc doesn't care about the prelink mangling, so for gcc purposes it's fine to use a generic sysroot for the target. this problem creates mysterious errors in gdb. if you don't supply the shared libs for the specific remote machine you're using, gdb will appear to work, but it will fail to do some things correctly, and there's no simple way of finding out what the problem is if you don't already know the answer. two example mysterious errors: 'break printf' fails with a message like 'Can't access memory at address ...' 'print "hi"' segfaults in a strange location. maybe setting the default solib-absolute-prefix to something like '[[please set solib-absolute-prefix]]' would be helpful when there isn't a sensible default. --