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: RFC --enable-debugging


On Wed, Nov 06, 2002 at 10:00:12PM +0100, Gabriel Dos Reis wrote:
> The primary purpose of the debugged version is to enable debugging.
> But, why the -O0 restriction? It has been reported to me that
> debugging C++ at anything higher than -O0 doesn't work or play nicely
> (I have had opposite experience, but presumably on "simple" constructs).

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.  

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.
Perhaps -glib?  Or -gc++?

I do consider the explicit path specification to be somewhat ugly, but
most ugliness gets hidden in a Makefile for me.

-- 
------------------------------------------------------------------
Brad Spencer - spencer@infointeractive.com - "It's quite nice..."
Systems Architect | InfoInterActive Corp. | A Canadian AOL Company


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