[patch] [python libstdc++ printers] Fix gdb/15195
Tom Tromey
tromey@redhat.com
Thu Jul 18 14:09:00 GMT 2013
>>>>> "Phil" == Phil Muldoon <pmuldoon@redhat.com> writes:
Phil> 2013-07-03 Phil Muldoon <pmuldoon@redhat.com>
Phil> PR gcc/53477
Phil> http://sourceware.org/bugzilla/show_bug.cgi?id=15195
Phil> * python/libstdcxx/v6/printers.py (Printer.__call__): If a value
Phil> is a reference, fetch referenced value.
Phil> (RxPrinter.invoke): Ditto.
Phil> * testsuite/libstdc++-prettyprinters/cxx11.cc (main): Add -O0
Phil> flag. Add referenced value tests.
Thanks Phil.
Remember to CC <libstdc++@gcc.gnu.org> on these notes.
Phil> + if value.type.code == gdb.TYPE_CODE_REF:
Phil> + value = value.referenced_value()
Phil> +
I think this code should test for the existence of referenced_value
using hasattr. Maybe somebody is still on gdb 7.4.
Tom
More information about the Libstdc++
mailing list