From: Vladimir Prus <vladimir@codesourcery.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb@sources.redhat.com
Subject: Re: MI & pretty-printing
Date: Wed, 19 Aug 2009 06:51:00 -0000 [thread overview]
Message-ID: <200908191012.02517.vladimir@codesourcery.com> (raw)
In-Reply-To: <m3hbw5dkzq.fsf@fleche.redhat.com>
On Tuesday 18 August 2009 Tom Tromey wrote:
> >>>>> "Volodya" == Vladimir Prus <vladimir@codesourcery.com> writes:
>
> Tom> We discussed it but, IIRC, did not come to any agreement about it.
>
> Volodya> Hmm, I though we decided that some hint to pretty-printers is
> Volodya> desirable. Anyway, let me repeat my point -- the descriptive
> Volodya> string is rather long, so might not fit in variables
> Volodya> window. Further, a frontend typically has some way to display
> Volodya> variable type already, so "std::vector" part of the string is
> Volodya> not helping either. So, I'd much rather have {...} for all
> Volodya> composite types in MI.
>
> I suppose we could have dynamic varobjs with children print "{...}" here
> always.
That's clearly one possibility.
> Or you could just do whatever you like in your GUI.
Can I? How do I know if a varobj is dynamic? ;-)
> I hesitate
> to change this because it isn't clear to me that "{...}" is a
> universally good choice for all GUIs and all printers.
I guess the most important question is that of mechanism. Right
now, we have one case (for a specific type/frontend combo) where
the string rendering of a value with children is not suitable.
There might be cases where it makes sense to use non-{...} rendering
for a type with children. Do we have a mechanism how pretty-printer
can use different string rendering for MI and CLI?
If we don't have it now, then I'd still prefer to have all these
change be merged to FSF HEAD, without waiting for such
mechanism to be designed. But then, for now, it's better to have
the most conservative behaviour, so that frontends do not start
to depend on string rendering of varobjs with children. And {...}
seems like the most conservative thing possible. Then, if we
run into type that both have children and have string rendering
that makes sense in MI, we can introduce some solution?
> Volodya> I don't know either. The current behaviour *feels* strange, but then my
> Volodya> WIP patch for kdevelop does not use this field at all, for incremental
> Volodya> fetches. Maybe we can leave it as is, for now.
>
> Yeah, I'm not sure if you need to watch the length for an increment
> -var-list-children.
Well, I guess for consistency, it's best to either drop numchild from
incremental -var-list-children response, or make it report the number
of children that is actually contained in the 'children' field.
> But, you definitely do for a -var-update.
Agreed.
- Volodya
next prev parent reply other threads:[~2009-08-19 6:12 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-13 17:42 Vladimir Prus
2009-07-14 1:55 ` Nick Roberts
2009-07-15 12:19 ` Vladimir Prus
2009-08-06 21:02 ` Tom Tromey
2009-08-07 5:18 ` Vladimir Prus
2009-08-15 20:43 ` Vladimir Prus
2009-08-17 18:48 ` Tom Tromey
2009-08-18 7:19 ` Vladimir Prus
2009-08-18 18:41 ` Tom Tromey
2009-08-19 6:51 ` Vladimir Prus [this message]
2009-08-19 19:50 ` Tom Tromey
2009-08-20 6:04 ` Vladimir Prus
2009-09-05 9:27 ` Vladimir Prus
2009-09-09 22:34 ` Tom Tromey
2009-09-14 11:19 ` 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=200908191012.02517.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