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: libstdc++ debug option


On 5 December 2013 00:22, Oleg Smolsky wrote:
> Hi all, I have a question about the |--enable-libstdcxx-debug option - do I
> need to pass it to the configure script in order to use the debugging
> features?

No.  That option causes a second set of libstdc++ libraries to be
built with (by default) CXXFLAGS="-O0 -g" and installed to
${libdir}/debug so that you can use LD_LIBRARY_PATH to use those
unoptimized libs if you want to step through libstdc++ code in GDB, it
does not affect the availability of any features.

See http://gcc.gnu.org/onlinedocs/libstdc++/manual/debug.html#debug.req

> Also, a complementary question: what happens when I define
> _GLIBCXX_DEBUG in the program yet the aforementioned flag was not passed to
> configure?

_GLIBCXX_DEBUG is completely unrelated to --enable-libstdcxx-debug, it
enables the Debug Mode, see
http://gcc.gnu.org/onlinedocs/libstdc++/manual/debug_mode.html


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