Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Vladimir Prus <ghost@cs.msu.su>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb@sources.redhat.com
Subject: Re: -var-list --locals proposal
Date: Tue, 16 Jan 2007 16:20:00 -0000	[thread overview]
Message-ID: <200701161920.17596.ghost@cs.msu.su> (raw)
In-Reply-To: <20070116071845.GA16388@nevyn.them.org>

On Tuesday 16 January 2007 10:18, Daniel Jacobowitz wrote:
> On Tue, Jan 16, 2007 at 10:00:44AM +0300, Vladimir Prus wrote:
> > > I think most of the complexity in this will come from reusing varobjs.
> > > Couldn't we do this with -var-update?  The meaning of in_scope="false"
> > > is a bit unclear today, since we use it for anything whose value we
> > > can't find, and in optimized code a variable can go in and out of
> > > scope.  So using that might not be a good idea.  We could add another
> > > marker, though, such as frame_exited="true" to indicate that a varobj's
> > > associated frame has returned (or otherwise disappeared from the
> > > stack).  A varobj would never transition from frame_exited="true" to
> > > frame_exited="false".
> > 
> > I think it would be good to reuse varobj accross the frames. So,
> > if you're in some function and look at its locals and then enter
> > another function and try to look at parents variables you get
> > the same varobjs. I don't think that creation of varobj is 
> > so expensive in gdb itself -- but for frontend it's more
> > convenient to always have the same varobj associated with 
> > a variable.
> 
> But, if we can export frame IDs in some safe and useful way to the
> frontend, we can avoid having to recreate them at all.  The front
> end would just know that they were the same, and not reissue -var-list.

So, you either have frame_id->list_of_varobjs mapping in gdb, or in
the frontend. I'm not sure which one is better. If this kept in a frontend,
you'd also need notification "frame id XXX has died" so that
the frontend can clean up its mapping.

We'd need similar thing for function arguments, perhaps -- command like

	-var-list --arguments

that would try hard to reuse varobjs and which command can be used
to implement stack display. I'd much prefer to have this logic in gdb,
because doing it in the frontend is not anyway simpler, I think.

- Volodya


 


  reply	other threads:[~2007-01-16 16:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-05 20:04 Vladimir Prus
2007-01-06 10:39 ` Eli Zaretskii
2007-01-06 11:14   ` Vladimir Prus
2007-01-06 11:24     ` Eli Zaretskii
2007-01-06 12:28       ` Vladimir Prus
2007-01-06 21:51         ` Nick Roberts
2007-01-16  6:57           ` Vladimir Prus
2007-01-10  3:38 ` Daniel Jacobowitz
2007-01-16  7:01   ` Vladimir Prus
2007-01-16  7:18     ` Daniel Jacobowitz
2007-01-16 16:20       ` Vladimir Prus [this message]
2007-01-16 22:52         ` Nick Roberts
2007-01-16 23:12           ` Vladimir Prus
2007-01-17  7:54             ` Nick Roberts
2007-01-17 21:34               ` 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=200701161920.17596.ghost@cs.msu.su \
    --to=ghost@cs.msu.su \
    --cc=drow@false.org \
    --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