aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/python
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2015-11-16 21:32:26 +0000
committerDoug Evans <devans@gcc.gnu.org>2015-11-16 21:32:26 +0000
commit46d825c59cd6d5df4784b99dc0fcb878c2b7c24f (patch)
treea3a5e016e24c49759099058b9dedf0638b1a67c4 /libstdc++-v3/python
parent83b4db6df5f0717e6537bc6ab63406a2acc340e3 (diff)
downloadgcc-46d825c59cd6d5df4784b99dc0fcb878c2b7c24f.zip
gcc-46d825c59cd6d5df4784b99dc0fcb878c2b7c24f.tar.gz
gcc-46d825c59cd6d5df4784b99dc0fcb878c2b7c24f.tar.bz2
re PR libstdc++/67440 (pretty-printing of a const set<foo> fails)
PR libstdc++/67440 * python/libstdcxx/v6/printers.py (find_type): Handle "const" in type name. * testsuite/libstdc++-prettyprinters/debug.cc: Add test for const set<int>. * testsuite/libstdc++-prettyprinters/simple.cc: Ditto. * testsuite/libstdc++-prettyprinters/simple11.cc: Ditto. From-SVN: r230437
Diffstat (limited to 'libstdc++-v3/python')
-rw-r--r--libstdc++-v3/python/libstdcxx/v6/printers.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/libstdc++-v3/python/libstdcxx/v6/printers.py b/libstdc++-v3/python/libstdcxx/v6/printers.py
index 12e732e..14f786a 100644
--- a/libstdc++-v3/python/libstdcxx/v6/printers.py
+++ b/libstdc++-v3/python/libstdcxx/v6/printers.py
@@ -85,7 +85,9 @@ except ImportError:
def find_type(orig, name):
typ = orig.strip_typedefs()
while True:
- search = str(typ) + '::' + name
+ # Use typ.name here instead of str(typ) to discard any const,etc.
+ # qualifiers. PR 67440.
+ search = typ.name + '::' + name
try:
return gdb.lookup_type(search)
except RuntimeError: