This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug mi/11335] -var-evaluate-expression should return the pretty printer's to_string result
- From: "jens dot elmenthaler at verigy dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 30 Mar 2010 07:20:45 -0000
- Subject: [Bug mi/11335] -var-evaluate-expression should return the pretty printer's to_string result
- References: <20100301114459.11335.jens.elmenthaler@verigy.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From jens dot elmenthaler at verigy dot com 2010-03-30 07:20 -------
(In reply to comment #3)
> I actually though that this summary is both too huge and not particularly
> useful in a frontend. Say, the type of container is already knows, so all
> the summary say is report the size. Maybe, for containers, we want to show
> [N] as opposed to {...}?
Yes, from the requirements point, this is what I miss most. Currently, I have
to expand the collection variable, if I just want to see how many elements it
contains. And this doesn't work well, because in a large collection I also
have to scroll to the end.
Lets assume your proposal, how would you decide it's a collection? You take
the display hint and if it's map or vector, it's collection. Next, how will
you determine the number of childen? You cannot use the children method and
use the iterate over all elements. If the collection is uninitialized, it may
never return. Alternatively, you could add a new method to the pretty printers.
It all boyls down to what our understanding of the to_string method is. Shall
it just provide a short summary to identify an object, or shall it be used to
dump all members in a string? I always interpreted as the first.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11335
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.