From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23306 invoked by alias); 3 Jun 2013 07:21:25 -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 22598 invoked by uid 48); 3 Jun 2013 07:21:15 -0000 From: "asmwarrior at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/53477] pretty printer fails with: Python Exception list index out of range Date: Mon, 03 Jun 2013 07:21: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: asmwarrior at gmail dot com 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/msg00067.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53477 --- Comment #6 from asmwarrior --- Hi, all, I create a simple c++ program to reproduce this bug: #include #include typedef std::set IntSet; typedef std::map IntToSetMap; int main() { IntToSetMap m; IntSet s; s.insert(5); m[3] = s; IntSet& refSet = m[3]; refSet.insert(6); return 0; } Now, you can set a BP in the line "refSet.insert(6);", and run the command "p refSet", you will get the error message. Python Exception list index out of range: $1 = std::set with 1 elements If you run "n", and then type "p refSet" again, you get: Python Exception list index out of range: $2 = std::set with 2 elements It looks like the elements number(from 1 to 2) is correct. Thanks Yuanhui Zhang