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 X-Sender: eliz AT is To: Andrew Cottrell cc: djgpp-workers AT delorie DOT com, Andris Pavenis Subject: Re: C++ Debugging Quirk/Problem (was Re: Debugging Problem with win2k (fwd) ) In-Reply-To: <001001c1fa53$37d5c2b0$0102a8c0@acceleron> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Precedence: bulk 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.