Re: pretty printer display hints for collections

Tom Tromey <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
>>>>> "Jens" == Elmenthaler, Jens <[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.