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 11/29/05, Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> wrote:
> 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.

You can achieve something like this already, but not exactly what you want ...

Configure GCC with --enable-libstdcxx-debug to get copies of the libs compiled with -g

Compile your code without optimisation to avoid inlining, then change your LD_LIBRARY_PATH to select either the normal libstdc++.so (without debug symbols), or the debug ones (with debug symbols) depending whether you want to debug the library code.

To prevent debug info being emitted for templates instantiated in your code, you could explicitly instantiate them in a separate module compiled without -g (this would be unnecessary for std::string and some iostream classes, which are already instantiated in the lib)

Far from ideal, I know, but it should work today, without compiler and debugger support for selecting what debug info you want.

jon


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