https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59170
--- Comment #14 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #7)
> "print it" should not automatically dereference.
The Python code that registers the printers for iterators even says:
# These shouldn't be necessary, if GDB "print *i" worked.
# But it often doesn't, so here they are.
i.e. automatically dereferencing is a hack due to the fact that trying to do it
inside GDB doesn't work.
But with Xmethods we can make "print *i" work, even when the relevant operator
definition is inlined and not in the debug info.