vector::operator[]

Benjamin Kosnik bkoz@redhat.com
Tue Nov 29 18:03:00 GMT 2005


> What would be even better (but this is a total dream for the time being
> I think) would be to have some king of debug classes. The idea would be
> to tag the debug information with some grouping information (eg
> Standard_C++_Lib, MyLibDebug, ....) and to allow the user to select the
> debug classes he want to use from the debugger...

Indeed, this would be cool.

There was some talk of integrating this kind of thing directly into the
debugger when the frysk project was getting started.

http://sourceware.org/frysk/

What was desired was really some kind of real type-aliasing tool for
gdb, where people who knew libstdc++ could come up with straightforward
and easy ways to represent things like std::string with the simplest
possible representation (char*), instead of the libstdc++ internals.

Other variants and functionality would also be possible.

Here's hoping that pans out.

FWIW you have some of this in non-free debuggers like totalview
currently.

> But maybe this is not totally a dream (at least for some uses), if we
> tie the debug classes to namespaces then the debugger could use the
> mangled names to automatically disable the stepping into std methods and
> functions, etc... I do not like the idea of tying debug classes to
> namespaces, but this could be an easy first step strictly located into
> gdb...
> 
> Is this feasible at all ???

I don't believe this is feasible with current gdb, at least in a
dynamic way, as gdb has enough problems just looking up the correct
fully-qualified item, without having users request alternates.

For static compilation units, things like debug mode would work. If you
want to do something similar with your code, you could use the same
approach as debug mode.

-benjamin



More information about the Libstdc++ mailing list