From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23082 invoked by alias); 14 Jun 2013 20:39:56 -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 22790 invoked by uid 48); 14 Jun 2013 20:39:52 -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: Fri, 14 Jun 2013 20:39: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: cc 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/msg00751.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53477 Tomasz Gajewski changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomga at wp dot pl --- Comment #8 from Tomasz Gajewski --- The testcase can be reduced to: #include typedef std::map IntToIntMap; int main() { IntToIntMap amap; IntToIntMap & mapref = amap; amap[1] = 1; return 0; } and the problem is with map references. Executing on line with 'amap[1] = 1;' commands to print 'amap' and 'mapref' I get: (gdb) set python print-stack full (gdb) p mapref Traceback (most recent call last): File "/home/tomga/devel/gdb-scripts/python/libstdcxx/v6/printers.py", line 438, in children rep_type = find_type(self.val.type, '_Rep_type') File "/home/tomga/devel/gdb-scripts/python/libstdcxx/v6/printers.py", line 52, in find_type field = typ.fields()[0] IndexError: list index out of range $3 = std::map with 0 elements (gdb) p amap $4 = std::map with 0 elements I get this with: $ g++ --version g++ (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3 ... $ gdb --version GNU gdb (GDB) 7.5.91.20130417-cvs-ubuntu ... Pretty printers from svn://gcc.gnu.org/svn/gcc/trunk/libstdc++-v3/python (currently latest revision: 200105. Currently I don't know how to debug this further.