From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8219 invoked by alias); 19 Mar 2010 17:41:11 -0000 Received: (qmail 8210 invoked by uid 22791); 19 Mar 2010 17:41:10 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-1.vmware.com (HELO smtp-outbound-1.vmware.com) (65.115.85.69) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 19 Mar 2010 17:41:07 +0000 Received: from mailhost4.vmware.com (mailhost4.vmware.com [10.16.67.124]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id C22195; Fri, 19 Mar 2010 10:41:05 -0700 (PDT) Received: from [10.20.124.100] (promd-2s-dhcp100.eng.vmware.com [10.20.124.100]) by mailhost4.vmware.com (Postfix) with ESMTP id B7F9AC9A57; Fri, 19 Mar 2010 10:41:05 -0700 (PDT) Message-ID: <4BA3B731.4020302@vmware.com> Date: Fri, 19 Mar 2010 17:41:00 -0000 From: Michael Snyder User-Agent: Thunderbird 2.0.0.22 (X11/20090609) MIME-Version: 1.0 To: "tromey@redhat.com" CC: "gdb@sourceware.org" Subject: Re: same-name vars from different scopes References: <4BA2B416.6000708@vmware.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-03/txt/msg00173.txt.bz2 Tom Tromey wrote: >>>>>> "Michael" == Michael Snyder writes: > > Michael> Is there a syntax for printing/using a static variable from a > Michael> different module, even though it's eclipsed by a more-local > Michael> variable of the same name? > > According the node Variables in the manual, this should work: > > print 'file.c'::global > > Surprisingly, I don't think I have ever actually done this. > > There's no syntax for printing a local variable which is hidden by a > more inner definition. Thanks Tom