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: [patch] [python libstdc++ printers] Fix gdb/15195


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


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