This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Using STL containers with GDB
- From: Daniel Jacobowitz <drow at false dot org>
- To: Vincent Benony <vbenony at nordnet dot fr>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 22 Apr 2008 08:14:03 -0400
- Subject: Re: Using STL containers with GDB
- References: <1208857199.6213.15.camel@bsr-desktop>
On Tue, Apr 22, 2008 at 11:39:59AM +0200, Vincent Benony wrote:
> Hi,
>
> I use gdb at work for some time now. We currently develop a
> multiplatform software which heavily use STL templates. As a result,
> it's always difficult to me to debug such code.
>
> I tried to find a way to debug more efficiently by using gdb scripts
> that were able to dump std::vector or std::list, but it was always
> painful.
>
> 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 !
Thanks for doing this. As for a long term solution, please take a
look at the in-progress Python branch, in Volodya's git repository.
STL support is a big missing feature, but we'd like to add it by
external scripts so that they can be distributed along with the
library, modified without recompiling GDB, and so forth. I think
Vladimir's got it printing std::vector already.
I really hope we'll have it included in the next release!
--
Daniel Jacobowitz
CodeSourcery