This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: libstdc++ debug option
- From: Oleg Smolsky <oleg dot smolsky at riverbed dot com>
- To: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Thu, 05 Dec 2013 11:09:02 -0800
- Subject: Re: libstdc++ debug option
- Authentication-results: sourceware.org; auth=none
- References: <529FC756 dot 9040307 at riverbed dot com> <CAH6eHdQptb=3oW+4LHXY622aO03jVwZLTkP1U2Ef1+pgYe68CQ at mail dot gmail dot com>
On 2013-12-04 17:03, Jonathan Wakely wrote:
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
Oh, I see. Thank you for the clarification! I already forcefully specify
the location of libstdc++ via -rpath, so I can easily point to the debug
variant for our debug builds.
Two more questions, if you don't mind:
- does the debug build work with _GLIBCXX_DEBUG?
- would a dynamically linked program work against both the debug build
of libstdc++ and the normal optimized one? (ie via multiple -rpath
settings that would fit either dev or production machines)
Oleg.