From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21876 invoked by alias); 25 Aug 2007 22:48:18 -0000 Received: (qmail 21790 invoked by uid 22791); 25 Aug 2007 22:48:17 -0000 X-Spam-Check-By: sourceware.org Received: from alnrmhc16.comcast.net (HELO alnrmhc16.comcast.net) (206.18.177.56) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 25 Aug 2007 22:48:11 +0000 Received: from gateway.sf.frob.com (c-67-160-211-197.hsd1.ca.comcast.net[67.160.211.197]) by comcast.net (alnrmhc16) with ESMTP id <20070825224809b1600qkrpte>; Sat, 25 Aug 2007 22:48:09 +0000 Received: from magilla.localdomain (magilla.sf.frob.com [198.49.250.228]) by gateway.sf.frob.com (Postfix) with ESMTP id 312CF357B; Sat, 25 Aug 2007 15:48:08 -0700 (PDT) Received: by magilla.localdomain (Postfix, from userid 5281) id ED6734D0555; Sat, 25 Aug 2007 15:48:07 -0700 (PDT) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Roland McGrath To: Jan Kratochvil Cc: gdb-patches@sourceware.org Subject: Re: [patch] build-id .debug files load (like .gnu_debuglink) In-Reply-To: Jan Kratochvil's message of Friday, 24 August 2007 20:04:50 +0200 <20070824180450.GA4216@host0.dyn.jankratochvil.net> X-Zippy-Says: Hold the MAYO & pass the COSMIC AWARENESS... Message-Id: <20070825224807.ED6734D0555@magilla.localdomain> Date: Sat, 25 Aug 2007 22:48:00 -0000 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/msg00475.txt.bz2 > This part may be questionable: > - debugfile = find_separate_debug_file (objfile); > + /* If the file has its own symbol tables it has no separate debug info. */ > + if (objfile->psymtabs == NULL) > + debugfile = find_separate_debug_file (objfile); As Daniel mentioned, this is certainly not correct. The main file might have a symbol table, but not have any debug info (i.e. DWARF sections). The condition I would use is the direct one: if the main file has no DWARF sections, then look for a separate debug file. > So far .gnu_debuglink existed only in the main file (not the .debug file) and > it existed only if the debug info was stripped to a separate file from it. This is still true. It's not entirely unreasonable to use presence of .gnu_debuglink as the sign that you should look for separate debug info, even if for the actual searching you ignore its contents when you have a build ID note. Thanks, Roland