This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/53477] pretty printer fails with: Python Exception <type 'exceptions.IndexError'> list index out of range
- From: "tomga at wp dot pl" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 15 Jun 2013 12:06:38 +0000
- Subject: [Bug libstdc++/53477] pretty printer fails with: Python Exception <type 'exceptions.IndexError'> list index out of range
- Auto-submitted: auto-generated
- References: <bug-53477-4 at http dot gcc dot gnu dot org/bugzilla/>
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: