This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: RFC --enable-debugging
- From: Brad Spencer <spencer at infointeractive dot com>
- To: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- Cc: Phil Edwards <phil at jaj dot com>, Benjamin Kosnik <bkoz at redhat dot com>,libstdc++ at gcc dot gnu dot org
- Date: Wed, 6 Nov 2002 17:15:13 -0400
- Subject: Re: RFC --enable-debugging
- References: <u8hef89r7o.fsf@gromit.moeb> <20021029161117.A21995@disaster.jaj.com> <20021031174957.A15579@disaster.jaj.com> <20021031194119.548d7555.bkoz@redhat.com> <m365vgyb38.fsf@soliton.integrable-solutions.net> <20021031224637.A18172@disaster.jaj.com> <m3of98w1sg.fsf@soliton.integrable-solutions.net> <20021106164201.E28449@infointeractive.com> <m33cqe4dnn.fsf@soliton.integrable-solutions.net>
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