This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: GDB pretty printers for iterators
- From: Tom Tromey <tromey at redhat dot com>
- To: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- Cc: "libstdc++" <libstdc++ at gcc dot gnu dot org>, Phil Muldoon <pmuldoon at redhat dot com>
- Date: Wed, 17 Mar 2010 11:23:16 -0600
- Subject: Re: GDB pretty printers for iterators
- References: <4348dea51003161758o51f7490elc4dc5c1c1140a0cb@mail.gmail.com>
- Reply-to: Tom Tromey <tromey at redhat dot com>
>>>>> "Jonathan" == Jonathan Wakely <jwakely.gcc@gmail.com> writes:
Jonathan> I've been playing with the GDB python printers again, and
Jonathan> noticed that printing an iterator just dereferences it and
Jonathan> prints the value it points to:
Yeah. That is an interim hack until we make operator* work
consistently. Our plan has been to remove the iterator printers once
this works, so users will have to "print *it" to see the contents.
I'm not sure how much actual progress on this we've made. I think not
much yet.
Jonathan> I think I'd rather have iterators print something like "iterator
Jonathan> pointing to 2" or even "-> 2"
I amenable to this or anything other change that you think would be
useful. I think it is fine to do this even if we plan to remove the
iterator printers, since we're not sure when the operator bugs will all
be fixed.
I suppose this would be a good time to say that we're doing a lot of
work on improving C++ debugging in gdb. One low cost way people can
help is to file bug reports; also I'm generally interested in people's
debugging stories and in understanding people's priorities -- what is
more important to fix, what is less, etc.
Tom