From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6522 invoked by alias); 1 Feb 2010 16:48:47 -0000 Received: (qmail 6512 invoked by uid 22791); 1 Feb 2010 16:48:46 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 01 Feb 2010 16:48:42 +0000 Received: (qmail 21281 invoked from network); 1 Feb 2010 16:48:39 -0000 Received: from unknown (HELO caradoc.them.org) (dan@127.0.0.2) by mail.codesourcery.com with ESMTPA; 1 Feb 2010 16:48:39 -0000 Date: Mon, 01 Feb 2010 16:48:00 -0000 From: Daniel Jacobowitz To: Keith Seitz Cc: gdb-patches@sourceware.org Subject: Re: [RFA 2/4] dwarf2_physname Message-ID: <20100201164837.GF21339@caradoc.them.org> Mail-Followup-To: Keith Seitz , gdb-patches@sourceware.org References: <20091217202843.GA11961@caradoc.them.org> <20091222192444.GB15339@caradoc.them.org> <4B576983.2090808@redhat.com> <20100126211733.GA17877@caradoc.them.org> <4B609019.1090807@redhat.com> <4B61F20B.7070908@redhat.com> <20100128202429.GA29835@caradoc.them.org> <4B622047.7020503@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B622047.7020503@redhat.com> User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2010-02/txt/msg00018.txt.bz2 I think we need to get these patches in to make progress; they're too big, and getting them down to no regressions on one platform is already a noteworthy accomplishment. So I'm going to keep comments to a minimum. That means you should probably wait to commit this until after GDB 7.1 branches (~ 2 weeks). On Thu, Jan 28, 2010 at 03:39:51PM -0800, Keith Seitz wrote: > -/* Determine whether a die of type TAG living in a C++ class or > - namespace needs to have the name of the scope prepended to the > - name listed in the die. */ > +/* Determine whether DIE needs to have the name of the scope prepended > + to the name listed in the die. */ > > static int > -pdi_needs_namespace (enum dwarf_tag tag) > +die_needs_namespace (struct die_info *die, struct dwarf2_cu *cu) > { > - switch (tag) > + switch (die->tag) > { > case DW_TAG_namespace: > case DW_TAG_typedef: > @@ -2623,7 +2612,23 @@ pdi_needs_namespace (enum dwarf_tag tag) > case DW_TAG_union_type: > case DW_TAG_enumeration_type: > case DW_TAG_enumerator: > + case DW_TAG_subprogram: > + case DW_TAG_member: > return 1; > + > + case DW_TAG_variable: > + { > + struct attribute *attr; > + attr = dwarf2_attr (die, DW_AT_specification, cu); > + if (attr) > + return 1; > + attr = dwarf2_attr (die, DW_AT_external, cu); > + if (attr == NULL && die->parent->tag != DW_TAG_namespace) > + return 0; > + return 1; > + } > + break; > + > default: > return 0; > } What's this about? It needs an explanation, and I don't think DW_AT_specification has anything to do with die_needs_namespace. -- Daniel Jacobowitz CodeSourcery