From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11309 invoked by alias); 28 Mar 2009 21:38:08 -0000 Received: (qmail 11300 invoked by uid 22791); 28 Mar 2009 21:38:08 -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 mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 28 Mar 2009 21:38:00 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n2SLbvl8020384 for ; Sat, 28 Mar 2009 17:37:57 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n2SLbwT7007927 for ; Sat, 28 Mar 2009 17:37:58 -0400 Received: from host0.dyn.jankratochvil.net (sebastian-int.corp.redhat.com [172.16.52.221]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n2SLbu8q006154 for ; Sat, 28 Mar 2009 17:37:57 -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 n2SLbrOp017142 for ; Sat, 28 Mar 2009 22:37:55 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.3/8.14.2/Submit) id n2SLbrnY017141 for gdb-patches@sourceware.org; Sat, 28 Mar 2009 22:37:53 +0100 Date: Sat, 28 Mar 2009 23:29:00 -0000 From: Jan Kratochvil To: gdb-patches@sourceware.org Subject: Re: [patch] Fix C `extern' shadowing in a local block Message-ID: <20090328213753.GA16821@host0.dyn.jankratochvil.net> References: <20090326212128.GA32657@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090326212128.GA32657@host0.dyn.jankratochvil.net> User-Agent: Mutt/1.5.18 (2008-05-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: 2009-03/txt/msg00651.txt.bz2 On Thu, 26 Mar 2009 22:21:28 +0100, Jan Kratochvil wrote: > fix GDB evaluation for: > { > int var = 1; > { > extern int var; > > Access "var" at this point from GDB which must access the `extern' variable. > } > } > > Such code will still not work due to GCC PR debug/39563. GCC may also fix it > a way compatible with current GDB (`extern var' to be global and use > DW_TAG_imported_declaration in the local block). Still IMO a valid DWARF > layout used in the attached .S testcase currently fails for GDB. The patch provided for GCC (but still not checked-in) requires fixed GDB: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39563#c5 Thanks, Jan