This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GDB pretty printers for iterators


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]