From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23076 invoked by alias); 25 Aug 2007 23:58:14 -0000 Received: (qmail 23036 invoked by uid 22791); 25 Aug 2007 23:58:13 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 25 Aug 2007 23:58:08 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id B0EBD9810C; Sat, 25 Aug 2007 23:58:08 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 9026098104; Sat, 25 Aug 2007 23:58:08 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.67) (envelope-from ) id 1IP5W1-00035t-D2; Sat, 25 Aug 2007 19:58:05 -0400 Date: Sat, 25 Aug 2007 23:58:00 -0000 From: Daniel Jacobowitz To: Jan Kratochvil Cc: gdb-patches@sourceware.org, Roland McGrath Subject: Re: [patch] build-id .debug files load (like .gnu_debuglink) Message-ID: <20070825235805.GA11876@caradoc.them.org> Mail-Followup-To: Jan Kratochvil , gdb-patches@sourceware.org, Roland McGrath References: <20070824180450.GA4216@host0.dyn.jankratochvil.net> <20070824182028.GA19512@caradoc.them.org> <20070825224914.GA11255@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070825224914.GA11255@host0.dyn.jankratochvil.net> User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-08/txt/msg00477.txt.bz2 On Sun, Aug 26, 2007 at 12:49:14AM +0200, Jan Kratochvil wrote: > You are right about the content of `/lib64/ld-linux-x86-64.so.2'. > Still in such case both `.dynsym' and `.symtab' gets read into MSYMBOLS but > PSYMTABS and SYMTABS are left forever NULL for the main executable (as there is > no .debug_info). > > While I would still expect the former patch was right I changed it according to > your advice. It is definitely the safe way but with a tiny performance hit: > > The reason of my check was that build-id (contrary to the debug-link) is always > present there, even for locally built unsplit files. With the patch attached > below GDB will try to open a separate debug file in /usr/lib/debug/.debug-id/ > even for the unsplit files. This step did not happen with my former patch. Right. There's two other ways we could check, which Roland suggested: presence of .gnu_debuglink and presence of .debug_info. I misread your original patch. If there's no .debug_info then there won't be any psymtabs. So that's probably the best check, and I apologize for the bad advice. I don't want to check for .gnu_debuglink; in the future maybe files which use build ID won't have a .gnu_debuglink section any more. -- Daniel Jacobowitz CodeSourcery