From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6764 invoked by alias); 10 Mar 2010 19:32:18 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 6754 invoked by uid 22791); 10 Mar 2010 19:32:17 -0000 X-SWARE-Spam-Status: No, hits=-7.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Date: Wed, 10 Mar 2010 19:32:00 -0000 From: Jan Kratochvil To: archer@sourceware.org Cc: Sami Wagiaalla , Keith Seitz Subject: Re: Cross-CU C++ DIE references vs. mangling Message-ID: <20100310193207.GA6147@host0.dyn.jankratochvil.net> References: <20100310191833.GA2816@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100310191833.GA2816@host0.dyn.jankratochvil.net> User-Agent: Mutt/1.5.20 (2009-08-17) X-SW-Source: 2010-q1/txt/msg00091.txt.bz2 On Wed, 10 Mar 2010 20:18:33 +0100, Jan Kratochvil wrote: > So GDB has to know the "S::i"->"_ZN1S1iE" mangling rules if there would be no > DW_AT_MIPS_linkage_name. Just in this case GDB will find out "S::i" in the > defining CU (or shared library) and it can completely ignore this declaration. ... > So there is a countercase where GDB cannot ignore such declaration-only DIE > (and it is AFAIK the only requirement for GDB internal LOC_UNRESOLVED type): > namespace S > { > int f () > { > int i = 42; > { > extern int i; > return i; > } > } > } ... > <4><92>: Abbrev Number: 9 (DW_TAG_lexical_block) > <93> DW_AT_low_pc : 0xb > <9b> DW_AT_high_pc : 0x11 > <2><45>: Abbrev Number: 4 (DW_TAG_variable) > <46> DW_AT_name : i > <4a> DW_AT_MIPS_linkage_name: (indirect string, offset: 0x40): _ZN1S1iE > <52> DW_AT_external : 1 > <53> DW_AT_declaration : 1 In this case if it see DW_AT_external + DW_AT_declaration it can also global "S::i" defining DIE so DW_AT_MIPS_linkage_name is probably really not needed. Found it only after posting it, sorry, Jan