same-name vars from different scopes

Tom Tromey tromey@redhat.com
Fri Mar 19 01:54:00 GMT 2010


>>>>> "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



More information about the Gdb mailing list