Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Vladimir Prus <vladimir@codesourcery.com>
To: gdb@sources.redhat.com
Subject: Re: Variables created with -var-create going out of scope unexpectedly?
Date: Thu, 20 Nov 2008 14:00:00 -0000	[thread overview]
Message-ID: <gg3qg1$gp4$1@ger.gmane.org> (raw)
In-Reply-To: <ed97310c0811200546x1cd3123ax6b10cf2ca4388396@mail.gmail.com>

Srinath Avadhanula wrote:

> Hi,
> 
> I am trying to play around with GDB/MI recently, in particular with
> the -var-create command. I see that a variable created with
> -var-create goes out of scope too quickly. In particular, if I later
> do -var-update, I see that in_scope="false"... The following is the
> test program and the GDB session which illustrates my question.
> 
> Basically, I put a breakpoint in the function foo below. This function
> gets called 4 times with 2 different stacks. If I use "display a" the
> first time I hit the breakpoint, the variable a gets displayed on all
> subsequent hits. However, if I do instead "-var-create - * a" the
> first time the breakpoint is hit and then do "-var-update 1 *" each
> subsequent time the break-point is hit, I only see 'in_scope="true"'
> the two times when foo() is reached with exactly the same stack. Is
> this expected? Is there an equivalent of gdb's "display" command for
> GDB/MI?

GDB/MI documentation in CVS HEAD describes this.

- Volodya



  reply	other threads:[~2008-11-20 14:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-20 13:47 Srinath Avadhanula
2008-11-20 14:00 ` Vladimir Prus [this message]
2008-11-20 14:33   ` Srinath Avadhanula
2008-11-20 15:37     ` Vladimir Prus

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='gg3qg1$gp4$1@ger.gmane.org' \
    --to=vladimir@codesourcery.com \
    --cc=gdb@sources.redhat.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