From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16597 invoked by alias); 22 Apr 2008 21:52:10 -0000 Received: (qmail 16589 invoked by uid 22791); 22 Apr 2008 21:52:09 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 22 Apr 2008 21:51:49 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 08F5B983DB; Tue, 22 Apr 2008 21:51:48 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id DDBC698060; Tue, 22 Apr 2008 21:51:47 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1JoQOw-0000pF-SK; Tue, 22 Apr 2008 17:51:46 -0400 Date: Tue, 22 Apr 2008 22:56:00 -0000 From: Daniel Jacobowitz To: Nick Roberts Cc: Vincent Benony , gdb-patches@sourceware.org Subject: Re: Using STL containers with GDB Message-ID: <20080422215146.GA3156@caradoc.them.org> Mail-Followup-To: Nick Roberts , Vincent Benony , gdb-patches@sourceware.org References: <1208857199.6213.15.camel@bsr-desktop> <18446.23053.860176.935315@kahikatea.snap.net.nz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18446.23053.860176.935315@kahikatea.snap.net.nz> User-Agent: Mutt/1.5.17 (2007-12-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-04/txt/msg00491.txt.bz2 On Wed, Apr 23, 2008 at 09:35:09AM +1200, Nick Roberts wrote: > > So, yesterday, I decided myself to look at the code of GDB. After a > > quick look, I wrote this patch. I know that it's not very clean, and > > that it makes many assumptions about STL containers, and that it cannot > > be considered as a long term feature for GDB, but, believe me, it's very > > very usefull ! > > > > Now, I can look at the content of list, vector, set, map, multiset, > > multimap and string simply with the classic "print" command of GDB. > > The Python branch appears to work for executables compiled with Gcc only. I'm > curious to know if this approach will work for executables built using other > compilers? Vincent's implementation has the layout of the GNU STL implementation hardcoded into it - so even less portable than the Python implementation, which uses the field names. -- Daniel Jacobowitz CodeSourcery