From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3495 invoked by alias); 2 Apr 2009 19:06:50 -0000 Received: (qmail 3487 invoked by uid 22791); 2 Apr 2009 19:06:49 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 02 Apr 2009 19:06:42 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id B0B3510DD5; Thu, 2 Apr 2009 19:06:40 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id 6F85710AD6; Thu, 2 Apr 2009 19:06:40 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1LpSFL-0002ac-Hu; Thu, 02 Apr 2009 15:06:39 -0400 Date: Thu, 02 Apr 2009 19:06:00 -0000 From: Daniel Jacobowitz To: Joel Brobecker Cc: Jan Kratochvil , gdb-patches@sourceware.org Subject: Re: [patch] Fix C `extern' shadowing in a local block Message-ID: <20090402190639.GA8955@caradoc.them.org> Mail-Followup-To: Joel Brobecker , Jan Kratochvil , gdb-patches@sourceware.org References: <20090326212128.GA32657@host0.dyn.jankratochvil.net> <20090402185413.GC9017@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090402185413.GC9017@adacore.com> User-Agent: Mutt/1.5.17 (2008-05-11) 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: 2009-04/txt/msg00041.txt.bz2 On Thu, Apr 02, 2009 at 11:54:13AM -0700, Joel Brobecker wrote: > This part makes me uncomfortable. I am afraid that doing so would be > misinterpreting the meaning of DW_AT_external. I think that this is what DW_AT_external means: the declaration represents an externally visible variable. > Also, I would mean > that we are treating this attribute differently depending on whether > we have a location attribute or not. This bothers me too, but I think it's OK. A local scope definition of an external variable with a location is an odd concept, and until I see an example that produces one, I have no idea what we should do with it. The only one I can think of would be a declaration (not definition) with location: DW_TAG_variable DW_AT_name: bar DW_AT_external: 1 DW_AT_declaration: 1 DW_AT_location: &bar But I don't think anyone produces that. I took a look at our LOC_UNRESOLVED handling; I don't think it's quite wise, since it ignores the full symbol table, but in practice that's fine for unstripped binaries. -- Daniel Jacobowitz CodeSourcery