This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: vector::operator[]


On Tue, 2005-11-29 at 17:14 +0000, chris jefferson wrote:

> In my local copy, I've already changed vector::size() from 
> "size_type(end() - begin())" to just "_M_impl._M_finish - 
> _M_impl._M_start", as walking though this code in debug mode is 
> incredibly painful.

What would be much better is to have a set of attributes, pragmas or
flags to control (per file or per function basis) the debugging level
one wants.

Typically, I would often find very useful to have debug information for
my code but not for the standard C++ library. This is one of the
drawbacks of having templated and inlined code in the libraries.
Often one would also want to avoid to enter within its own trivial
accesors...

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...

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 ???

	Theo.

 


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