From: Vladimir Prus <vladimir@codesourcery.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb@sources.redhat.com
Subject: Re: Robustifying pretty-printers
Date: Fri, 10 Jul 2009 18:46:00 -0000 [thread overview]
Message-ID: <200907102246.16291.vladimir@codesourcery.com> (raw)
In-Reply-To: <m3skh41o2z.fsf@fleche.redhat.com>
On Friday 10 July 2009 Tom Tromey wrote:
> >>>>> "Vladimir" == Vladimir Prus <vladimir@codesourcery.com> writes:
>
> Tom> -var-set-child-range 10 20
> Tom> -var-list-children
>
> Vladimir> And what children with -var-update reevaluate? From 10 to
> Vladimir> 20? Or from 0 to 20? If the former, it's not very useful. If
> Vladimir> the latter, then it appears that low boundary is only used
> Vladimir> for -var-list-children.
>
> Right. There is a separation between what the varobj code does
> internally, and what MI reports to the FE.
>
> -var-set-child-range affects what is reported to the FE. Only
> children in that range are reported. I was assuming the same would be
> true even if this were done via arguments to -var-list-children.
>
> What happens in varobj is another matter. Currently we always fetch
> children starting at 0, because the pretty-printers have a simple,
> iterator-based design.
>
> Vladimir> Maybe, it's most useful to decouple setting the range for -var-update
> Vladimir> and getting specific children. So, if frontend wants more children
> Vladimir> now, it will do:
>
> Vladimir> -var-list-children 10 20
>
> Vladimir> and if it wishes for 20 children to be fetched from now on, it will
> Vladimir> explicitly do:
>
> Vladimir> -var-set-child-limit 20
>
> What is the difference between this and "-var-list-children 0 20"?
That frontend needs one command, not two. Let me try to explain this
in a different way. Suppose we don't have -var-update at all. Then,
we don't need any reason for varobj to remember a limit. FE will use
-var-list-children to get whatever children it wants to display.
With -var-update, we have two choices:
1. Either plugin emits -var-update for individual varobjs, with the
desired range, or
2. Varobj remembers the number of children to fetch.
1 is cumbersome. 2 requires that varobj remember the upper limit only.
That's why I am suggesting -var-set-child-limit with a single parameter.
If I'm not making myself clear yet, maybe we should talk on IRC, say on
Monday?
- Volodya
next prev parent reply other threads:[~2009-07-10 18:46 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-13 10:11 Vladimir Prus
2009-06-13 10:21 ` Vladimir Prus
2009-06-15 12:28 ` Phil Muldoon
2009-06-15 12:39 ` Vladimir Prus
2009-06-15 12:55 ` Daniel Jacobowitz
2009-06-15 13:25 ` Vladimir Prus
2009-06-16 7:22 ` André Pönitz
2009-06-15 20:01 ` Tom Tromey
2009-06-16 8:22 ` Vladimir Prus
2009-07-07 21:48 ` Tom Tromey
2009-07-09 17:20 ` Vladimir Prus
2009-07-09 19:14 ` Tom Tromey
2009-07-10 6:13 ` Vladimir Prus
2009-07-10 16:25 ` Tom Tromey
2009-07-10 16:40 ` Vladimir Prus
2009-07-10 16:48 ` Tom Tromey
2009-07-10 18:46 ` Vladimir Prus [this message]
2009-07-10 18:52 ` Tom Tromey
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=200907102246.16291.vladimir@codesourcery.com \
--to=vladimir@codesourcery.com \
--cc=gdb@sources.redhat.com \
--cc=tromey@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