This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug libstdc++/53477] pretty printer fails with: Python Exception <type 'exceptions.IndexError'> list index out of range


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53477

--- Comment #9 from Tomasz Gajewski <tomga at wp dot pl> ---
Following patch seems to solve this problem although I don't like it very much.
I think whole get_basic_type function should be moved to the beginning of
printers.py.

And additionally I'm not sure if this change does not break something somewhere
else. If not I think get_basic_type and find_type should be merged into one
function. If not calls to them should be replaced appappropriately. I leave it
to someone else.


Index: libstdcxx/v6/printers.py
===================================================================
--- libstdcxx/v6/printers.py    (revision 200105)
+++ 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 = Printer.get_basic_type(orig)
     while True:
         search = str(typ) + '::' + name
         try:


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