[patch] fix stl printer for const containers

Pedro Larroy pedro.larroy.lists@gmail.com
Wed Feb 5 19:38:00 GMT 2014


Hi

In case you have const set<string> the printer fails, this patch fixes
this by removing qualifiers on find_type

Please apply.

piotr@gominola:0:~/devel/gdb_python$ svn diff
Index: libstdcxx/v6/printers.py
===================================================================
--- libstdcxx/v6/printers.py    (revision 207518)
+++ libstdcxx/v6/printers.py    (working copy)
@@ -39,7 +39,7 @@
 # handles searching upward through superclasses.  This is needed to
 # work around http://sourceware.org/bugzilla/show_bug.cgi?id=13615.
 def find_type(orig, name):
-    typ = orig.strip_typedefs()
+    typ = orig.strip_typedefs().unqualified()
     while True:
         search = str(typ) + '::' + name
         try:
piotr@gominola:0:~/devel/gdb_python$ svn info
Path: .
Working Copy Root Path: /home/piotr/storage/devel/gdb_python
URL: svn://gcc.gnu.org/svn/gcc/trunk/libstdc++-v3/python
Repository Root: svn://gcc.gnu.org/svn/gcc
Repository UUID: 138bc75d-0d04-0410-961f-82ee72b054a4
Revision: 207518
Node Kind: directory
Schedule: normal
Last Changed Author: rsandifo
Last Changed Rev: 206301
Last Changed Date: 2014-01-02 23:30:10 +0100 (Thu, 02 Jan 2014)



More information about the Gdb-patches mailing list