This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: test availability of variables in context from user command
- From: Michael Snyder <Michael dot Snyder at palmsource dot com>
- To: Christophe Demarey <Christophe dot Demarey at inria dot fr>
- Cc: gdb at sourceware dot org
- Date: Fri, 23 Feb 2007 11:48:40 -0800
- Subject: Re: test availability of variables in context from user command
- References: <45DF0F48.60507@inria.fr>
On Fri, 2007-02-23 at 16:59 +0100, Christophe Demarey wrote:
> Hello,
>
> I want to check the availability of a variable (var1 for instance) in
> the context from an user command but I don't find any way to do this.
Just interjecting a thought -- it would be nice if gdb had a
"which" command. It could not only tell you whether an identifier
was in scope, but tell you WHICH scope it was in. Could be useful,
for instance, to tell you that a local was over-shadowing a global.