From: "Rob Quill" <rob.quill@gmail.com>
To: gdb@sourceware.org
Subject: Command File Scope Checking
Date: Mon, 23 Oct 2006 20:15:00 -0000 [thread overview]
Message-ID: <baf6008d0610231315hddc2526y95de739e69f7c8@mail.gmail.com> (raw)
In-Reply-To: <baf6008d0610231314k2e8d512ckf89dcb6873ba70cb@mail.gmail.com>
On 23/10/06, Eli Zaretskii <eliz@gnu.org> wrote:
> > 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.
So is it possible to check the result of doing info address foobar,
whilst still in the command file? So that if it is out of scope the
script can do action B instead of action A?
Thanks,
Rob
>
> 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
>
next prev parent reply other threads:[~2006-10-23 20:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-23 10:45 Rob Quill
2006-10-23 14:31 ` Eli Zaretskii
[not found] ` <baf6008d0610231314k2e8d512ckf89dcb6873ba70cb@mail.gmail.com>
2006-10-23 20:15 ` Rob Quill [this message]
2006-10-23 20:20 ` Daniel Jacobowitz
2006-10-23 21:08 ` Rob Quill
2006-10-23 22:23 ` Jim Blandy
2006-10-24 4:21 ` Eli Zaretskii
2006-10-24 9:52 ` Rob Quill
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=baf6008d0610231315hddc2526y95de739e69f7c8@mail.gmail.com \
--to=rob.quill@gmail.com \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox