From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29534 invoked by alias); 3 Dec 2003 20:35:36 -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 29521 invoked from network); 3 Dec 2003 20:35:36 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 3 Dec 2003 20:35:36 -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 hB3KZa211689 for ; Wed, 3 Dec 2003 15:35:36 -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 hB3KZZ212861; Wed, 3 Dec 2003 15:35:35 -0500 Received: from localhost.localdomain (vpn50-70.rdu.redhat.com [172.16.50.70]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id hB3KZZbS007963; Wed, 3 Dec 2003 15:35:35 -0500 Received: (from kev@localhost) by localhost.localdomain (8.11.6/8.11.6) id hB3KZTg01947; Wed, 3 Dec 2003 13:35:29 -0700 Date: Wed, 03 Dec 2003 20:35:00 -0000 From: Kevin Buettner Message-Id: <1031203203529.ZM1946@localhost.localdomain> In-Reply-To: "Kris Warkentin" "interesting solib-absolute-prefix problem" (Dec 3, 2:48pm) References: <064801c3b9d6$5de8e5b0$0202040a@catdog> To: "Kris Warkentin" , "Gdb@Sources.Redhat.Com" Subject: Re: interesting solib-absolute-prefix problem MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-12/txt/msg00063.txt.bz2 On Dec 3, 2:48pm, Kris Warkentin wrote: > One would think that not initializing solib-absolute-prefix when doing > native debugging would work but the problem for us is that we need to find > /x86/usr/lib/ldqnx.so (our linker) rather than /proc/boot/libc.so since our > image builder strips all the section information from binaries and gdb uses > the .dynamic section. > > To make a long story short, I put an 'open() of last resort' in solib_open > right at the end where if all else fails, it tries to open the exact path it > was given. It would seem to me that this is probably not too dangerous but > someone might be able to comment on this better than I. I don't really like this patch. If someone sets solib-absolute-prefix incorrectly - a quite common occurrence, I've found - we don't want to inadverently open the host's /lib/libc.so (or the like). In this case, it's preferable for gdb to print an error message. It would, perhaps, be less misleading if GDB were to list the paths that it tried (and failed) to open. It's still not clear to me why you need solib-absolute-prefix set when doing native debugging. (You explained it above, but I don't understand your environment well enough to comprehend the explanation.) Kevin