From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7342 invoked by alias); 15 Jun 2013 12:06:44 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 7294 invoked by uid 48); 15 Jun 2013 12:06:41 -0000 From: "tomga at wp dot pl" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/53477] pretty printer fails with: Python Exception list index out of range Date: Sat, 15 Jun 2013 12:06:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 4.7.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tomga at wp dot pl X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-06/txt/msg00789.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53477 --- Comment #9 from Tomasz Gajewski --- 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: