This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: casting in gdb
- From: David Carlton <carlton at math dot stanford dot edu>
- To: Michael Elizabeth Chastain <mec at shout dot net>
- Cc: drow at mvista dot com, gdb at sources dot redhat dot com
- Date: 15 Jan 2003 10:47:36 -0800
- Subject: Re: casting in gdb
- References: <200212150547.gBF5lg511015@duracef.shout.net>
On Sat, 14 Dec 2002 23:47:42 -0600, Michael Elizabeth Chastain <mec@shout.net> said:
> I'm playing with the idea that gdb should know more about the C++
> standard library types, in the same spirit that gdb knows that a C
> "char *" usually points to a string terminated with '\0'. I would
> like gdb to understood more about std::string, std::vector, std:map,
> and so on.
I was going through my old messages, and I noticed this one. For what
it's worth, Apple has implemented something like this for strings in
Objective C, where they actually print out the string in question, and
they say it works pretty well. Apparently the implementation of
strings is complicated enough that they really didn't want to tie it
to the implementation; so GDB prints out Objective C strings by
actually doing the method call.
Of course, the above message was part of a thread that noted that, in
C++, the appropriate methods might not be compiled in. That's a real
problem; I'm not sure what to do about that.
David Carlton
carlton@math.stanford.edu