From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15894 invoked by alias); 5 Feb 2008 11:31:45 -0000 Received: (qmail 15854 invoked by uid 22791); 5 Feb 2008 11:31:37 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 05 Feb 2008 11:31:18 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.14.1/8.14.1) with ESMTP id m15BV7cG024713; Tue, 5 Feb 2008 12:31:08 +0100 (CET) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.14.1/8.14.1/Submit) id m15BV7kd006854; Tue, 5 Feb 2008 12:31:07 +0100 (CET) Date: Tue, 05 Feb 2008 11:31:00 -0000 Message-Id: <200802051131.m15BV7kd006854@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: ghost@cs.msu.su CC: gdb@sources.redhat.com In-reply-to: (message from Vladimir Prus on Tue, 05 Feb 2008 09:16:53 +0300) Subject: Re: Variable objects and STL containers References: <18343.64413.689019.489727@kahikatea.snap.net.nz> 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-02/txt/msg00020.txt.bz2 > From: Vladimir Prus > Date: Tue, 05 Feb 2008 09:16:53 +0300 > > Technically, there is formal interface, called iterators, provided by the > C++ standard. I don't have the slightest confidence in gdb not falling over > if you try to use them, though. That means that you actually have to call functions in the inferior, which might modify state you don't want to modify. And of course it doesn't work at all for core dumps. > We discussed using Python scripting for that; in fact, I have a patch locally > that will make > > -var-evaluate-expression V > > for a vector print something like: > > [1,2,3] > > I'm working on making those element the children of the variable object, > but it's not done yet. Still this means that you'll need to write python code for each and every STL implementation, and play catchup whenever the implementation is changed. I guess the only way to get this to work is to connvince the GCC people to maintain the python code together with libstdc++.