This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: How to get debug mode version of libstdc++ when compiling GCC
- From: "Pit Cuppens" <pcuppens at gmx dot net>
- To: libstdc++ at gcc dot gnu dot org
- Date: Fri, 23 Jul 2004 15:24:03 +0200 (MEST)
- Subject: Re: How to get debug mode version of libstdc++ when compiling GCC
> 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)
>
> 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:
./tmp
Segmentation fault
Exit 139
What I am saying is that the directory
/home/pc/software/gcc-3.3.2/include
does not contain any debugging code at all.
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 ?
Many thanks,
Pit
P.S. My file tmp.c looks as follows:
#include <iostream>
#include <vector>
int main(int,char **) {
std::vector<int> vsds;
vsds[4] = 1;
}
--
+++ GMX DSL-Tarife 3 Monate gratis* +++ Nur bis 25.7.2004 +++
Bis 24.000 MB oder 300 Freistunden inkl. http://www.gmx.net/de/go/dsl