This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: casting in gdb


On Sat, Dec 14, 2002 at 11:47:42PM -0600, Michael Elizabeth Chastain wrote:
> 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.
> 
> Daniel J, what do you think?

I think there's a pretty big problem with approaching the problem from
this side.  You can't do it by teaching GDB more about the _types_. 
You have to teach it more about the _implementation_.  i.e. every time
you do this it is tied to a particular STL implementation.

I'm not saying that it's a bad idea, just that you need to look at it
from the other side first.

That said, we need generic facilities for target-specific type handling;
that would be really nice.  Do we care that this means "MyVector[0]"
will make a function call and "std::vector[0]" won't?  I don't think we
will.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]