From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10757 invoked by alias); 15 Apr 2004 13:52:38 -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 10749 invoked from network); 15 Apr 2004 13:52:37 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 15 Apr 2004 13:52: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 i3FDqau6024775 for ; Thu, 15 Apr 2004 09:52:36 -0400 Received: from lacrosse.corp.redhat.com (lacrosse.corp.redhat.com [172.16.52.154]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i3FDqaj00436; Thu, 15 Apr 2004 09:52:36 -0400 Received: from miranda.boston.redhat.com (sebastian-int.corp.redhat.com [172.16.52.221]) by lacrosse.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i3FDqal28885; Thu, 15 Apr 2004 09:52:36 -0400 Received: by miranda.boston.redhat.com (Postfix, from userid 2638) id D64A6247B2; Thu, 15 Apr 2004 09:51:05 -0400 (EDT) To: Jim Blandy Cc: gdb-patches@redhat.com Subject: Re: DW_AT_specification: long ago GDB change From: Jason Merrill In-Reply-To: (Jim Blandy's message of "15 Apr 2004 00:17:23 -0500") References: Date: Thu, 15 Apr 2004 13:52:00 -0000 Message-ID: User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-04/txt/msg00306.txt.bz2 On 15 Apr 2004 00:17:23 -0500, Jim Blandy wrote: > Back in 1999, you posted this patch: > > http://sources.redhat.com/ml/gdb-patches/1999-q4/msg00325.html > > Do you know why you tested for the presence of DW_AT_specification, as > well as DW_AT_declaration? > > I can't think of a case where a die would be a declaration, but also > refer to a specification; since DW_AT_specification generally points > from definitions to previous declarations, I'd rather expect > specifications to point at declarations. And even if a declaration > did have a specification, it would still be a declaration. Yes. IIRC, the issue is that dwarf_attr looks through the DW_AT_specification link, so it will find a DW_AT_declaration attribute in the definition. Also looking for DW_AT_specification allows us to avoid that false positive for the test. Jason