From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12729 invoked by alias); 25 Mar 2010 18:13:24 -0000 Received: (qmail 12720 invoked by uid 22791); 25 Mar 2010 18:13:24 -0000 X-SWARE-Spam-Status: No, hits=-7.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_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; Thu, 25 Mar 2010 18:13:16 +0000 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o2PIDDrv029505 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 25 Mar 2010 14:13:13 -0400 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o2PID9Lh008560 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 25 Mar 2010 14:13:12 -0400 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.3/8.14.3) with ESMTP id o2PID8K9015608; Thu, 25 Mar 2010 19:13:08 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.3/8.14.3/Submit) id o2PID7eu015589; Thu, 25 Mar 2010 19:13:07 +0100 Date: Thu, 25 Mar 2010 18:13:00 -0000 From: Jan Kratochvil To: Ulrich Weigand Cc: gdb-patches@sourceware.org Subject: Re: [rfc] Fix some cases of "using" declarations with older G++ versions Message-ID: <20100325181307.GA12511@host0.dyn.jankratochvil.net> References: <201003251627.o2PGR0Mm002491@d12av02.megacenter.de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201003251627.o2PGR0Mm002491@d12av02.megacenter.de.ibm.com> User-Agent: Mutt/1.5.20 (2009-08-17) 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-03/txt/msg00851.txt.bz2 On Thu, 25 Mar 2010 17:27:00 +0100, Ulrich Weigand wrote: > @@ -3940,6 +3940,30 @@ read_func_scope (struct die_info *die, s > > inherit_abstract_dies (die, cu); > > + /* If we have a DW_AT_specification, we might need to import using > + directives from the context of the specification DIE. See the > + comment in determine_prefix. */ > + if (cu->language == language_cplus) > + { > + struct dwarf2_cu *spec_cu = cu; > + struct die_info *spec_die = die_specification (die, &spec_cu); This may also fetch DW_AT_abstract_origin which has been already imported by inherit_abstract_dies. But duplicate DW_TAG_imported_module should not hurt. > + > + while (spec_die) > + { > + child_die = spec_die->child; > + while (child_die && child_die->tag) > + { > + if (child_die->tag == DW_TAG_imported_module) > + process_die (child_die, cu); spec_cu probably? > + child_die = sibling_die (child_die); > + } > + > + /* In some cases, GCC generates specification DIEs that > + themselves contain DW_AT_specification attributes. */ > + spec_die = die_specification (spec_die, &spec_cu); > + } > + } > + > new = pop_context (); > /* Make a block for the local symbols within. */ > block = finish_block (new->name, &local_symbols, new->old_blocks, Thanks, Jan