Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Christophe Demarey <Christophe.Demarey@inria.fr>
To: Rob Quill <rob.quill@gmail.com>, drow@false.org
Cc: gdb@sourceware.org
Subject: Re: test availability of variables in context from user command
Date: Fri, 23 Feb 2007 19:56:00 -0000	[thread overview]
Message-ID: <45DF2F46.8040400@inria.fr> (raw)
In-Reply-To: <baf6008d0702230912w10f053e1s260da745ee27dc9a@mail.gmail.com>

Rob Quill wrote:
> I modifed GDB to make in possible to cehck whether variables are in
> scope. I'm not sure if that's what you want, but you can do things
> like:
>
> print $in_scope(var1);
>
> or in a command file:
>
> if($in_scope(var1) == 1)
>
> i.e. do something if var1 is in scope.
It's exactly what I want to check.
> At the moment it only covers
> certain cases as I haven't had time to finish it off, but it wouldn't
> be hard to do. I modified it against 6.6, but hopefully I can forge a
> patch out of it, if you want it.
Unfortunately, this solution doesn't fit our needs because our gdb user 
commands will crash on non-patched gdb versions.
But I think it should be a good idea to have a such integrated 
functionality (a full scripting language too).

Thanks a lot for your answers.

Regards,
Christophe.


  reply	other threads:[~2007-02-23 18:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-23 17:37 Christophe Demarey
2007-02-23 18:16 ` Rob Quill
2007-02-23 19:56   ` Christophe Demarey [this message]
2007-02-23 19:50 ` Daniel Jacobowitz
2007-02-24  8:24 ` Michael Snyder

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=45DF2F46.8040400@inria.fr \
    --to=christophe.demarey@inria.fr \
    --cc=drow@false.org \
    --cc=gdb@sourceware.org \
    --cc=rob.quill@gmail.com \
    /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