The gdb.Type.name attribute was only added in GDB 7.7, so several printer tests fail on older GDB versions. Since all we need is to strip cv-qualifiers we can use gdb.Type.unqualified() for that.
PR libstdc++/67440 * python/libstdcxx/v6/printers.py (find_type): Avoid gdb.Type.name for GDB 7.6 compatibility, use gdb.Type.unqualified instead. Tested powerpc64le-linux (CentOS 7.3) and committed to trunk.
commit 99b545642724a7a584fb1155a1cd2d9339468c8c Author: Jonathan Wakely <jwak...@redhat.com> Date: Thu Mar 16 13:50:29 2017 +0000 PR libstdc++/67440 make pretty printers work with GDB 7.6 again PR libstdc++/67440 * python/libstdcxx/v6/printers.py (find_type): Avoid gdb.Type.name for GDB 7.6 compatibility, use gdb.Type.unqualified instead. diff --git a/libstdc++-v3/python/libstdcxx/v6/printers.py b/libstdc++-v3/python/libstdcxx/v6/printers.py index 36dd81d..14025dd 100644 --- a/libstdc++-v3/python/libstdcxx/v6/printers.py +++ b/libstdc++-v3/python/libstdcxx/v6/printers.py @@ -85,9 +85,8 @@ except ImportError: def find_type(orig, name): typ = orig.strip_typedefs() while True: - # Use typ.name here instead of str(typ) to discard any const,etc. - # qualifiers. PR 67440. - search = typ.name + '::' + name + # Strip cv-qualifiers. PR 67440. + search = '%s::%s' % (typ.unqualified(), name) try: return gdb.lookup_type(search) except RuntimeError: