This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: same-name vars from different scopes
- From: Tom Tromey <tromey at redhat dot com>
- To: Michael Snyder <msnyder at vmware dot com>
- Cc: "gdb\ at sourceware dot org" <gdb at sourceware dot org>
- Date: Thu, 18 Mar 2010 19:54:11 -0600
- Subject: Re: same-name vars from different scopes
- References: <4BA2B416.6000708@vmware.com>
- Reply-to: tromey at redhat dot com
>>>>> "Michael" == Michael Snyder <msnyder@vmware.com> 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.
Tom