From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10319 invoked by alias); 1 Feb 2010 19:39:54 -0000 Received: (qmail 10309 invoked by uid 22791); 1 Feb 2010 19:39:53 -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 19:39:49 +0000 Received: (qmail 11910 invoked from network); 1 Feb 2010 19:39:47 -0000 Received: from unknown (HELO caradoc.them.org) (dan@127.0.0.2) by mail.codesourcery.com with ESMTPA; 1 Feb 2010 19:39:47 -0000 Date: Mon, 01 Feb 2010 19:39:00 -0000 From: Daniel Jacobowitz To: Keith Seitz Cc: gdb-patches@sourceware.org Subject: Re: [RFA 2/4] dwarf2_physname Message-ID: <20100201193941.GA17445@caradoc.them.org> Mail-Followup-To: Keith Seitz , gdb-patches@sourceware.org References: <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> <20100201164837.GF21339@caradoc.them.org> <4B672C38.60007@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B672C38.60007@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/msg00026.txt.bz2 On Mon, Feb 01, 2010 at 11:32:08AM -0800, Keith Seitz wrote: > On 02/01/2010 08:48 AM, Daniel Jacobowitz wrote: > >>+ 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. > > DW_AT_specification is, as I deduce from ifdefing that out and > running the testsuite :-), needed for many namespace-based variables: DW_AT_specification is present for many variables in namespaces (at least in current GCC output). But what significance does it actually have? Can you explain the check above in terms of the DWARF standard? If not, I don't think it's right. DW_AT_specification just says that there is a specification of this variable in another DIE. The same variable could be written with or without it. -- Daniel Jacobowitz CodeSourcery