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: How to get debug mode version of libstdc++ when compiling GCC


On Fri, Jul 23, 2004 at 03:24:03PM +0200, Pit Cuppens wrote:

> > Those options are nothing to do with the debug mode, they will install
> > copies of the libstdc++ libs with debugging symbols included.
> > 
> > Please read http://gcc.gnu.org/onlinedocs/libstdc++/debug.html
> > 
> > (which hasn't been updated to include my comment that the debug mode was
> > introduced in version 3.4)
    ^^^^^^^^^^^^^^^^^^^^^^^^^  READ THIS LINE!!!
> > 
> > jon
> 
> I have read this, but if I understand it correctly, then
> something like 
> 
>   /home/pc/software/gcc-3.3.2/bin/g++ -g3 -O0 -D_GLIBCXX_DEBUG tmp.c -o 
> tmp
> 
> should enable debug mode. Which it doesn't:

No, debug mode is not available in 3.3.2. At all. It doesn't matter what
configuration options you use, or what compiler switches, you can't use
debug mode with 3.3.2. At all. It's not there.

You _can_ build libs with debugging symbols, and use a debugger. But
that is not the libstdc++ debug mode. The libstdc++ debug mode is only
available in GCC 3.4.0 and later. Not in 3.3.2.

> What I am saying is that the directory
> 
>   /home/pc/software/gcc-3.3.2/include
> 
> does not contain any debugging code at all.

No. It wouldn't. That's because the debug mode is not available in GCC
3.3.2, or any version before 3.4.0.

> I can see the files 'vector', etc. there,
> but the directory 'debug/' is missing. (I
> assume here that it is indeed true that
> libstdc++ has a debug/ directory, as is
> the case in my gcc-3.4.1 installation.) So
> the flag '-D_GLIBCXX_DEBUG' in the above
> compiler call doesn't have any effect at all.
> 
> Or do I missinterpret the text in 
> 
>   http://gcc.gnu.org/onlinedocs/libstdc++/debug.html ?

No, you've misinterpreted every reply I've sent you. Please read them
again:

http://gcc.gnu.org/ml/libstdc++/2004-07/msg00140.html
http://gcc.gnu.org/ml/libstdc++/2004-07/msg00148.html

Benjamin also demonstrated what would happen with your code, if (and
ONLY if) you use GCC 3.4.0 or later:

http://gcc.gnu.org/ml/libstdc++/2004-07/msg00142.html

Good luck.

jon


-- 
"Everybody understands Mickey Mouse. Few understand Herman Hesse.
 Only a handful understood Albert Einstein. And nobody understood
 Emperor Norton."
	- Slogan of NORTON CABAL - S.F.


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