From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18358 invoked by alias); 8 Dec 2008 19:00:04 -0000 Received: (qmail 18296 invoked by uid 22791); 8 Dec 2008 19:00:03 -0000 X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 08 Dec 2008 18:59:13 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id mB8IxBbv007088; Mon, 8 Dec 2008 13:59:11 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id mB8IxANw010077; Mon, 8 Dec 2008 13:59:10 -0500 Received: from opsy.redhat.com (vpn-13-131.rdu.redhat.com [10.11.13.131]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id mB8Ix9ig020122; Mon, 8 Dec 2008 13:59:09 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id 9660C378613; Mon, 8 Dec 2008 11:59:08 -0700 (MST) To: "Xiaoliang Lee" Cc: gdb@sourceware.org Subject: Re: STL debugging References: From: Tom Tromey Reply-To: tromey@redhat.com Date: Mon, 08 Dec 2008 19:00:00 -0000 In-Reply-To: (Xiaoliang Lee's message of "Mon\, 8 Dec 2008 22\:08\:24 +0800") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-12/txt/msg00022.txt.bz2 >>>>> ">" == Xiaoliang Lee writes: >> Do you know how to debug source using STL especially how to see all >> the entries in the container conveniently? If you don't mind the bleeding edge, and you are using gcc, you can try the python branch. It has pretty-printers for most of the containers in libstdc++. There's a build-and-install tutorial here, with more info in subsequent posts: http://tromey.com/blog/?p=494 Enabling the printers is still a bit obscure. You must invoke: python import gdb.libstdcxx.v6.printers This problem will go away eventually. Tom