delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/05/13/06:28:06

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f
Date: Mon, 13 May 2002 13:25:08 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Andrew Cottrell <acottrel AT ihug DOT com DOT au>
cc: djgpp-workers AT delorie DOT com, Andris Pavenis <pavenis AT latnet DOT lv>
Subject: Re: C++ Debugging Quirk/Problem (was Re: Debugging Problem with win2k (fwd) )
In-Reply-To: <001001c1fa53$37d5c2b0$0102a8c0@acceleron>
Message-ID: <Pine.SUN.3.91.1020513131817.11246C-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Mon, 13 May 2002, Andrew Cottrell wrote:

> There still appears to be problems with GCC 3.04 & GDB 5.2 (Rhide) debugging
> C++ apps. I have tried the source (test.cpp) code below in Rhide 1.5.0
> snaphot dated 30-Apr-2002 with GCC 3.04 and it appears that the C++
> debugging output is not quite working correctly in Rhide. I can step over
> the lines, but cannot set a breakpoint on a line and go to the line. Eli,
> Rhide 1.5.0 uses GDB 5.2.

Are you saying that -gstabs+ worked for me in the example I posted 
because I used GDB 5.1.1, and that it would have failed if I used 5.2?
I will try GDB 5.2 later today (don't have it where I type this); could 
you try an older RHIDE based on GDB 5.1.1 (if there is such a beast)?

> If I use "-g2" option I cannot debug, but this
> option works okay on C programs.

This means COFF debug info is broken.  I suggest to report this to the 
GDB and GCC mailing lists.  I'm almost sure the problem is in GCC, since 
I see the same bug in GDB 5.1.1, and because older versions of GCC don't 
have those problems.

> Now for the hard questions:-
>     With GCC 3.04 and GDB 5.2 what is the prefered (optimal/workable
> etc....) switches for C++ debugging?

I don't think anyone knows the answer.  We are dealing with subtle bugs 
both in GCC and in GDB, coupled with a monstrously large language such as 
C++.  It will take time to weed out those bugs on both sides.  In the 
meantime, your best bet is to try -gstabs+ first, then go to -ggdb3 if 
stabs doesn't work well enough.

It is important to report these problems to GDB and GCC maintainers in 
order to have them fixed quickly.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019