This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: MI & pretty-printing
- From: Vladimir Prus <vladimir at codesourcery dot com>
- To: gdb at sources dot redhat dot com
- Date: Thu, 20 Aug 2009 09:30:12 +0400
- Subject: Re: MI & pretty-printing
- References: <200907132142.18043.vladimir@codesourcery.com> <m3zl9v8vmf.fsf@fleche.redhat.com>
Tom Tromey wrote:
>>>>>> "Volodya" == Vladimir Prus <vladimir@codesourcery.com> writes:
>
> Tom> I hesitate to change this because it isn't clear to me that "{...}"
> Tom> is a universally good choice for all GUIs and all printers.
>
> I'm reconsidering this. When would the immediate value of a varobj with
> children be of interest? It certainly doesn't seem to be for
> non-pretty-printed varobjs.
Well, I don't have any case at hand where immediate value would be of
*that* great value. FWIW, when I run into "too long string value"
issue I though about was to have shorter summary for vector, e.g. "[2]",
but then figured it's additional work, and folks did not complain
about "{...}" so far.
>
> Volodya> Do we have a mechanism how pretty-printer can use different
> Volodya> string rendering for MI and CLI?
>
> Not at present. We could add one, of course, but I have been trying to
> push the current simple design as far as it would go. Partly this is
> just stubbornness but also I do think that simplicity has some intrinsic
> virtue, at least when you can get away with it.
FWIW, I was driving exactly at this simplicity point :-)
>
> Volodya> And {...} seems like the most conservative thing
> Volodya> possible. Then, if we run into type that both have children and
> Volodya> have string rendering that makes sense in MI, we can introduce
> Volodya> some solution?
>
> Yeah. I'll do this.
Great, thanks!
- Volodya