From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19643 invoked by alias); 15 Apr 2004 05:01:39 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 19632 invoked from network); 15 Apr 2004 05:01:37 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 15 Apr 2004 05:01:37 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i3F51bu6005538 for ; Thu, 15 Apr 2004 01:01:37 -0400 Received: from zenia.home.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i3F51Zj06438; Thu, 15 Apr 2004 01:01:36 -0400 To: Daniel Jacobowitz Cc: Joel Brobecker , Elena Zannoni , gdb-patches@sources.redhat.com Subject: Re: [RFA/dwarf-2] Fix for the null record problem References: <20040219140145.GB804@gnat.com> <16437.11835.435941.553479@localhost.redhat.com> <20040401011813.GE888@gnat.com> <20040413052655.GB1173@gnat.com> <20040414174729.GA612@nevyn.them.org> From: Jim Blandy Date: Thu, 15 Apr 2004 05:01:00 -0000 In-Reply-To: <20040414174729.GA612@nevyn.them.org> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-04/txt/msg00295.txt.bz2 Daniel Jacobowitz writes: > > The following C++ code produces Dwarf 2 info where the definition of > > struct s::t has a DW_AT_specification attribute, but GDB doesn't skip > > it, and I don't really understand why: > > Did you misread die_is_declaration? > > return (dwarf2_attr (die, DW_AT_declaration, cu) > && ! dwarf2_attr (die, DW_AT_specification, cu)); Yes, I misread it. That explains a lot. :) > I don't even know what that DW_AT_specification test is doing there - > the idea of a declaration with a specification is pretty peculiar. > ... > It's not clear why the specification check is there; the important bit > was presumably: > > ! if (die->has_children) > > ! if (die->has_children && ! die_is_declaration (die)) > > i.e. the point of the patch was to add the DW_AT_declaration check. Yeah. The other place it's used is in checking data members of structs. There, too, you shouldn't have declarations with specifications. I'll ask Jason if he remembers. Joel,how about dropping the DW_AT_specification test from die_is_declaration, and then using it in the new test in your patch?