RFC --enable-debugging
Gabriel Dos Reis
gdr@integrable-solutions.net
Wed Nov 6 13:27:00 GMT 2002
Brad Spencer <spencer@infointeractive.com> writes:
| I truth, I do my debugging on the non-optimized builds most of the
| time. But when bugs appear in the field, I am running an optimized
| version (with debugging symbols). This way, if it crashes, I get not
| just a stack trace but a hope of poking into a few objects and
| basically getting as much information as possible. So, I would like a
| way to say "give me all the debugging symbols, but this is a release
| version", which is what I do by doing (essentially) "-O3 -g". I
| consider optimization-with-debugging to be one of the great features
| of gcc.
Certainly, I do appreciate that feature and I would like to see much
more support for it (alas I'm not yet versed in GDB internals). But
when debugging an "optimized but still debug-enabled" program I
really hate to see "Program received SIGSEV at 0xdeadbeef in ??? ()"
because the corresponding function is from a non debug-enabled version
of the library (and for quite long time, my $CFLAGS has included -g).
| I think debugging C++ on levels higher than -O0 is possible and does
| work; one just has to be aware that the debugger could be lying :)
|
| > My gripe with -L approach is that you have to remember exactly the
| > path and that may be rather long or combersome to type. Having to
| > repeat things the compiler knows about at build time has always been
| > proven to be error prone.
|
| Perhaps there is a need for a new option that explicitly says "look
| for debugging libraries" that is independent from the selection of
| debugging symbols? This is what I would really prefer, I think.
I will be happy with that -- that is a better alternative I presume.
-- Gaby
More information about the Libstdc++
mailing list