https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59161
--- Comment #11 from Jonathan Wakely ---
I've forced the relevant printers to convert to a string explicitly, so now you
always get the address, which seems better than {ref = }
So I think the libstdc++ part is fixed, do we want a GDB bug to con
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59161
--- Comment #10 from Jonathan Wakely ---
Author: redi
Date: Thu Dec 15 13:25:22 2016
New Revision: 243690
URL: https://gcc.gnu.org/viewcvs?rev=243690&root=gcc&view=rev
Log:
PR59161 make pretty printers always return strings
PR libstdc++
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59161
--- Comment #9 from Pedro Alves ---
> Sounds like Paul's original patch may have introduced an undesired
> conflation. AFAICS, options.addressprint's exists to implement "set print
> address on/off", which had for original motivation, from the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59161
--- Comment #8 from Pedro Alves ---
Sounds like Paul's original patch may have introduced an undesired conflation.
AFAICS, options.addressprint's exists to implement "set print address on/off",
which had for original motivation, from the manual:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59161
--- Comment #7 from Jonathan Wakely ---
This behaviour effectively means pretty printers for generic C++ types must
never return gdb.Value from to_string() because they have no idea if GDB's
default stringification will be sane. An optional can't
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59161
--- Comment #6 from Jonathan Wakely ---
That seems quite arbitrary and inconsistent. In other contexts if I return a
gdb.Value it gets stringified as expected, e.g the
StdListPrinter._iterator.__next__ method does:
return ('[%d]' % count, va
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59161
Jan Kratochvil changed:
What|Removed |Added
CC||palves at redhat dot com
--- Comment #5
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59161
--- Comment #4 from Jonathan Wakely ---
This seems like a GDB bug, since all the pretty printer does is:
def to_string(self):
return self.val['_M_current'].dereference()
So stringifying that is done by GDB, and should produce the "r
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59161
Jan Kratochvil changed:
What|Removed |Added
CC||redi at gcc dot gnu.org
Compon