Mail Archives: djgpp-workers/2002/05/13/06:28:06
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 -