From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7748 invoked by alias); 1 Feb 2010 19:32:18 -0000 Received: (qmail 7738 invoked by uid 22791); 1 Feb 2010 19:32:18 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 01 Feb 2010 19:32:13 +0000 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o11JWC2W015810 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 1 Feb 2010 14:32:12 -0500 Received: from [IPv6:::1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o11JW8hb032293 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 1 Feb 2010 14:32:11 -0500 Message-ID: <4B672C38.60007@redhat.com> Date: Mon, 01 Feb 2010 19:32:00 -0000 From: Keith Seitz User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-3.fc11 Lightning/1.0pre Thunderbird/3.0 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Re: [RFA 2/4] dwarf2_physname 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> <20100201164837.GF21339@caradoc.them.org> In-Reply-To: <20100201164837.GF21339@caradoc.them.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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/msg00025.txt.bz2 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: *************** PASS: gdb.cp/namespace.exp: ptype OtherF *** 12145,12159 **** KFAIL: gdb.cp/namespace.exp: ptype ::C::OtherFileClass (PRMS: gdb/1448) PASS: gdb.cp/namespace.exp: ptype C::OtherFileClass PASS: gdb.cp/namespace.exp: print cX ! PASS: gdb.cp/namespace.exp: print 'F::cXf' ! PASS: gdb.cp/namespace.exp: print F::cXf ! PASS: gdb.cp/namespace.exp: print F::cXfX PASS: gdb.cp/namespace.exp: print X ! PASS: gdb.cp/namespace.exp: print 'G::Xg' ! PASS: gdb.cp/namespace.exp: print G::Xg ! PASS: gdb.cp/namespace.exp: print G::XgX ! PASS: gdb.cp/namespace.exp: print cXOtherFile ! PASS: gdb.cp/namespace.exp: print XOtherFile PASS: gdb.cp/namespace.exp: print AAA::ALPHA Running ../../../src/gdb/testsuite/gdb.cp/namespace-nested-import.exp ... PASS: gdb.cp/namespace-nested-import.exp: print C::x --- 12145,12159 ---- KFAIL: gdb.cp/namespace.exp: ptype ::C::OtherFileClass (PRMS: gdb/1448) PASS: gdb.cp/namespace.exp: ptype C::OtherFileClass PASS: gdb.cp/namespace.exp: print cX ! FAIL: gdb.cp/namespace.exp: print 'F::cXf' ! FAIL: gdb.cp/namespace.exp: print F::cXf ! FAIL: gdb.cp/namespace.exp: print F::cXfX PASS: gdb.cp/namespace.exp: print X ! FAIL: gdb.cp/namespace.exp: print 'G::Xg' ! FAIL: gdb.cp/namespace.exp: print G::Xg ! FAIL: gdb.cp/namespace.exp: print G::XgX ! FAIL: gdb.cp/namespace.exp: print cXOtherFile ! FAIL: gdb.cp/namespace.exp: print XOtherFile PASS: gdb.cp/namespace.exp: print AAA::ALPHA Running ../../../src/gdb/testsuite/gdb.cp/namespace-nested-import.exp ... PASS: gdb.cp/namespace-nested-import.exp: print C::x I apologize, it has been quite some time since this was written, and I've forgotten much of the context. So commenting out the code and re-running the test suite is the best I can do to remember why some things were done. Was there something else in particular that was unclear? Keith PS. Tom also has a patch on expr-cumulative in this spot that deals with static variables defined inside a block.