From: Vladimir Prus <ghost@cs.msu.su>
To: Nick Roberts <nickrob@snap.net.nz>
Cc: gdb-patches@sources.redhat.com
Subject: Re: variable objects and registers
Date: Thu, 21 Dec 2006 08:34:00 -0000 [thread overview]
Message-ID: <200612211133.16281.ghost@cs.msu.su> (raw)
In-Reply-To: <17802.15684.48367.885442@kahikatea.snap.net.nz>
On Thursday 21 December 2006 10:52, Nick Roberts wrote:
> > > gdb_block_vars only gets called if gdb_get_blocks finds a new block which
> > > then finds any variabes local to it. That way new variable objects can be
> > > added (and old ones deleted if a block has disappeared) while keeping
> > > the variable objects which are still in scope. I think we should implement
> > > these functions in MI (perhaps Apple already have).
> >
> > Again, I think we need more automated approach. Frontend should have a
> > single command that:
> >
> > 1. Reports which local variables are really dead now
> > 2. Creates and reports variable object for new locals
> > 3. Reports which varobjs are out of scope
>
> We don't seem to be finding much agreement, except that what I have described
> does 2 and 3, and I don't really understand the difference between 1 and 3
> When would a variable belong to just one of those two groups?
If you've left a function, then all variables in that function are really dead. If you
have a variable in most-nested scope in a function (say inside loop), that variable
can go in scope and go out of scope many times as you step though the function.
When you leave a function, the frontend might want to completely remove its
data structures. When leaving local scope, it might want to just show the relevant
GUI item is "out of scope" -- gray perhaps.
> > For example:
> >
> > -var-update --locals
> > ^done,varobjs=[{name="v1",in_scope="false"....}{"name="v2",in_scope="true"....}]
> > created=[{name="v3"....],
> > gone-forever=[{name="v0"...}]
> >
> >
> > Apple creates varobjs for all variables in all blocks in a function, and use
> > "in_scope" to track their scope. That might be good approach too. IIRC,
> > you've posted a patch to consider block boundaries when computing
> > "in_scope"? That's exactly what's needed for this approach to work.
>
> Yes, I'm fairly sure that's what the above functions from Insight do. That
> wouldn't be a coincidence either because ChangeLog records show that Jim Ingham
> worked on Insight while at Cygnus.
The first point I'm making here is that MI is not in-process interface, so we need to minimize
the amount of commands. I believe that to update local variables, frontend should emit *one*
command, that would provide all the necessary information -- including new/deleted varobjs,
in/out scope, and new values.
- Volodya
next prev parent reply other threads:[~2006-12-21 8:34 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-06 10:57 Nick Roberts
2006-12-19 17:59 ` Vladimir Prus
2006-12-19 21:58 ` Nick Roberts
2006-12-20 18:39 ` Vladimir Prus
2006-12-20 20:34 ` Nick Roberts
2006-12-21 1:34 ` Nick Roberts
2006-12-21 6:34 ` Vladimir Prus
2006-12-21 7:57 ` Nick Roberts
2006-12-21 8:34 ` Vladimir Prus [this message]
2006-12-30 20:26 ` Daniel Jacobowitz
2006-12-30 20:41 ` Vladimir Prus
2006-12-30 20:50 ` Daniel Jacobowitz
2006-12-30 23:05 ` Nick Roberts
2006-12-21 6:43 ` Vladimir Prus
2006-12-21 8:34 ` Nick Roberts
[not found] ` <0E190425-7C4F-4C6E-B8B3-9A3FA79F6FE3@apple.com>
2006-12-21 23:30 ` Nick Roberts
[not found] ` <1B6B17FA-65DE-4CE2-9BE0-20DA74780EEA@apple.com>
2006-12-22 4:47 ` Nick Roberts
2006-12-22 6:23 ` Vladimir Prus
2006-12-22 6:51 ` Nick Roberts
2006-12-22 7:30 ` Vladimir Prus
2007-01-05 9:04 ` Vladimir Prus
-- strict thread matches above, loose matches on Subject: below --
2006-11-29 17:21 Vladimir Prus
2006-12-05 21:16 ` Daniel Jacobowitz
2006-12-06 9:25 ` Vladimir Prus
2006-12-19 22:02 ` Daniel Jacobowitz
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=200612211133.16281.ghost@cs.msu.su \
--to=ghost@cs.msu.su \
--cc=gdb-patches@sources.redhat.com \
--cc=nickrob@snap.net.nz \
/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