Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Vladimir Prus <ghost@cs.msu.su>
To: Nick Roberts <nickrob@snap.net.nz>
Cc: Jim Ingham <jingham@apple.com>,  gdb-patches@sources.redhat.com
Subject: Re: variable objects and registers
Date: Fri, 22 Dec 2006 06:23:00 -0000	[thread overview]
Message-ID: <200612220923.22655.ghost@cs.msu.su> (raw)
In-Reply-To: <17803.25142.328258.338868@kahikatea.snap.net.nz>

On Friday 22 December 2006 07:42, Nick Roberts wrote:
>  > Sadly, neither Jason nor I will get a chance to do anything other  
>  > that our already scheduled tasks till we're done with Leopard -  
>  > sometime middle of next year or thereabouts.  We have a lot on our  
>  > plates till then, and don't have any time available for this.  I  
>  > can't really say what our plans will be after that.
> 
> OK, well thanks for the pointers anyway.
> 
>  > >> Another kind of useful addition along the same lines, we extended the
>  > >> "FRAME" argument to -var-create so you can say:
>  > >>
>  > >> -var-create - +main.c:6 bar
>  > >>
>  > >> to create the variable object for bar in the scope surrounding line
>  > >> 6.  This is necessary if you want to do variable values in tooltips
>  > >> using variable objects.
>  > >
>  > > Yes, I see Insight uses variable objects for tooltips too.  What  
>  > > advantage do
>  > > they have over just using "print"?
>  > 
>  > The Xcode tooltips allow structure expansion & formatting the same  
>  > way the locals display does.  Using varobj's for this makes the code  
>  > uniform, and simpler.
> 
> Insight just prints the type as a tooltip for structures.  You seem to be
> saying that in Xcode you can do this and choose to expand it.  Using "print"
> in Emacs, everything is automatically expanded which I must admit is messy
> with a large array or structure.  Perhaps -data-evaluate-expression could
> be modified to print "--simple-values" or "--all-values" as -stack-list-locals
> does.

I think it's much better to use varobjs for tooltips. It's much better for structures.

> Actually I see Insight gets it wrong, when one variable masks another with
> the same name, just printing the current value.  I guess variable objects
> allow such values to be correctly accessed, but they generally they seem
> to be designed for tracking values rather than getting instantaneous ones
> as with tooltips.

There's no reason why -var-create cannot be extended to also specify line
at which the expression must be evaluated -- computing the right block.

- Volodya


  reply	other threads:[~2006-12-22  6:23 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
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 [this message]
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=200612220923.22655.ghost@cs.msu.su \
    --to=ghost@cs.msu.su \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jingham@apple.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