This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: libstdc++ debug option
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Oleg Smolsky <oleg dot smolsky at riverbed dot com>
- Cc: "libstdc++" <libstdc++ at gcc dot gnu dot org>
- Date: Thu, 5 Dec 2013 01:03:04 +0000
- Subject: Re: libstdc++ debug option
- Authentication-results: sourceware.org; auth=none
- References: <529FC756 dot 9040307 at riverbed dot com>
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