[python] Pretty-printers and addressprint

Tom Tromey tromey@redhat.com
Tue Nov 10 18:56:00 GMT 2009


>>>>> "Paul" == Paul Pluzhnikov <ppluzhnikov@google.com> writes:

Paul> AFAICT, in GDB repr(value) is a no-op, and the end result of returning
Paul> repr(value) from the pretty-printer is exactly the same as that of
Paul> returning the value itself:

That is because repr(value) ends up in valpy_str, which calls
common_val_print.

What you want instead is repr(value.string()), at least if you want to
try this route.

Tom



More information about the Gdb mailing list