From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32201 invoked by alias); 15 Apr 2004 05:20:17 -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 32168 invoked from network); 15 Apr 2004 05:20:16 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 15 Apr 2004 05:20:16 -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 i3F5KGu6010058 for ; Thu, 15 Apr 2004 01:20:16 -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 i3F5KEj11064; Thu, 15 Apr 2004 01:20:15 -0400 To: Jason Merrill CC: gdb-patches@sources.redhat.com Subject: DW_AT_specification: long ago GDB change From: Jim Blandy Date: Thu, 15 Apr 2004 05:20:00 -0000 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/msg00296.txt.bz2 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. Looking at the only code in gcc/dwarf2out.c that adds DW_AT_specification attributes to dies supports this: /* Add an AT_specification attribute to a DIE, and also make the back pointer from the specification to the definition. */ static inline void add_AT_specification (dw_die_ref die, dw_die_ref targ_die) { add_AT_die_ref (die, DW_AT_specification, targ_die); if (targ_die->die_definition) abort (); targ_die->die_definition = die; } I guess if there were several declarations chained together, eventually pointing to a definition, then the intermediate dies could have both attributes. Does this happen?