This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: pretty printer display hints for collections
- From: Tom Tromey <tromey at redhat dot com>
- To: "Elmenthaler\, Jens" <JENS dot ELMENTHALER at advantest dot com>
- Cc: "gdb\ at sourceware dot org" <gdb at sourceware dot org>
- Date: Wed, 24 Apr 2013 13:16:15 -0600
- Subject: Re: pretty printer display hints for collections
- References: <CEA8125BCE884349929B204B961E547128E39CDB at DEBOSVPEX001 dot ent dot rt dot verigy dot net>
>>>>> "Jens" == Elmenthaler, Jens <JENS.ELMENTHALER@advantest.com> writes:
Jens> Before I move to the libstdc++ mailing list or scratch my head how to
Jens> adapt Eclipse CDT being robust AND usable at the same time, is there
Jens> any good reason why the STL pretty printers for list, bitset, dqueue,
Jens> ... don't use display hint "array"?
For list, I can't think of a reason.
deque seems to return 'array' in the current libstdc++ printers.py.
bitset is funny because the interesting information is in the indices.
The values are all '1'. However, this could be changed.
Jens> Or more generally, shouldn't any pretty printer for a collection
Jens> either use display hint "array" or "map"?
I wouldn't want to make a sweeping statement like that, but it seems
like a reasonable first approximation.
A long time ago we discussed how to get gdb to print multi-dimensional
arrays more nicely. Those would not fit into this scheme. (Nobody is
working on this right now, but there's still a bug open somewhere.)
Maybe a "set" style would be appropriate. I'm not sure.
Tom