This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Command File Scope Checking
- From: Eli Zaretskii <eliz at gnu dot org>
- To: "Rob Quill" <rob dot quill at gmail dot com>
- Cc: gdb at sourceware dot org
- Date: Mon, 23 Oct 2006 10:30:57 -0400
- Subject: Re: Command File Scope Checking
- References: <baf6008d0610230345m4c079635h5c5110cf5d01ab45@mail.gmail.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Mon, 23 Oct 2006 11:45:23 +0100
> From: "Rob Quill" <rob.quill@gmail.com>
>
> Is it possible to check if a variable is in scope when using a command
> file, because I don't want control to return to GDB when a variable
> goes out of scope, so I would like to know if a variable is in scope
> before I check the value of it.
(gdb) info address foobar
No symbol "foobar" in current context.
If the variable _is_ in scope, you will see a different message, like
this:
(gdb) info address arglen
Symbol "arglen" is a variable in register eax.
or maybe this:
Symbol "gdb_use_lsb" is static storage at address 0x815e720