From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30964 invoked by alias); 8 Jan 2008 21:57:10 -0000 Received: (qmail 30955 invoked by uid 22791); 8 Jan 2008 21:57:09 -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; Tue, 08 Jan 2008 21:56:50 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id E17A598216; Tue, 8 Jan 2008 21:56:48 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id C3B4D98022; Tue, 8 Jan 2008 21:56:48 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1JCMRD-0003Jd-Ln; Tue, 08 Jan 2008 16:56:47 -0500 Date: Tue, 08 Jan 2008 21:57:00 -0000 From: Daniel Jacobowitz To: Aleksandar Ristovski Cc: dje@google.com, gdb-patches@sourceware.org, Ryan Mansfield Subject: Re: [RFA] patch for DW_AT_comp_dir/DW_AT_name vs .debug_line inco nsistencies Message-ID: <20080108215647.GA12656@caradoc.them.org> Mail-Followup-To: Aleksandar Ristovski , dje@google.com, gdb-patches@sourceware.org, Ryan Mansfield References: <2F6320727174C448A52CEB63D85D11F40A72@nova.ott.qnx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2F6320727174C448A52CEB63D85D11F40A72@nova.ott.qnx.com> User-Agent: Mutt/1.5.17 (2007-12-11) 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: 2008-01/txt/msg00167.txt.bz2 On Tue, Jan 08, 2008 at 04:51:02PM -0500, Aleksandar Ristovski wrote: > 1. case 3.3.5: > DW_AT_name is correct, according to point 2 of quoted document. > DW_AT_comp_dir is correct, according to point 6 of the quoted text. > File table in debug_line section is correct (according to the spec) as it > specifies files relative to DW_AT_comp_dir. You can't use the DWARF specification like this. It describes a representation, but not all the semantics of the representation; there are plenty of things that appear valid according to the specification and are still broken or meaningless. In the end you have to judge the debug info based on its usefulness to consumers. The compiler specifies the same directory using two completely different names. I think this is a bug in the compiler, and that GDB is not obliged to figure out that the two files are the same. If you still need GDB to figure this out, I am open to a patch which handles the case of a single entry in the line table with the correct basename (i.e. if there is only one "main.c"). For any more complicated situation, I think that guessing is too likely to break some other case with more useful debug information. -- Daniel Jacobowitz CodeSourcery