From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 962 invoked by alias); 23 Dec 2002 23:26:12 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 939 invoked from network); 23 Dec 2002 23:26:11 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by 209.249.29.67 with SMTP; 23 Dec 2002 23:26:11 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 18Qdq0-0005JU-00; Mon, 23 Dec 2002 19:26:28 -0600 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 18Qbyf-0001mN-00; Mon, 23 Dec 2002 18:27:17 -0500 Date: Mon, 23 Dec 2002 15:26:00 -0000 From: Daniel Jacobowitz To: "Joshua D. Marantz" Cc: gdb@sources.redhat.com Subject: Re: gdb 5.3 issues with g++ 3.2 on RedHat 7.3 & Solaris 9. Message-ID: <20021223232717.GA6675@nevyn.them.org> Mail-Followup-To: "Joshua D. Marantz" , gdb@sources.redhat.com References: <15879.37039.491529.709506@zinc.carbondesignsystems.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15879.37039.491529.709506@zinc.carbondesignsystems.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2002-12/txt/msg00310.txt.bz2 On Mon, Dec 23, 2002 at 05:39:43PM -0500, Joshua D. Marantz wrote: > Hello, > > We are having trouble debugging C++ code. Are there a number of > outstanding issues Hundreds, I sometimes think. > gdb 5.2.1, gdb 5.3 > g++ 3.1.1, 3.2, 3.2.1 > g++ compile options "-g", "-g3", "-ggdb", "-gstabs", "-gstabs+", "-gdwarf-2" > SGI STL & STLport 4.5.3 > RedHat 7.3 & Solaris 9 I highly recommend using just -g and GCC 3.2.1; that'll give you DWARF-2. -g3 is also good. > Symptoms include: > > - breakpoints in constructors do not work. gdb says they get set successfully, > but they do not actually break. This occurs whether the constructors are > inline or out-of-line. This generally works, although with DWARF-2 it's dodgy. The problem is well understood and I haven't completely made up my mind what to do about it yet. > - casting on the command line does not work -- yields a syntax error Never seen this; there are problems with naming types that might be causing it, I suppose... > - printing contents of instances of STL classes sometimes crashes This should not happen in GDB 5.3. > - frequent gdb crashes (sorry this is so vague...) Nor should this, although I know of at least one (calling functions in a breakpoint's command list isn't fixed yet). > - when compiling with -gstabs+, I can print most structures, but I can't > call class methods from gdb. > - when compiling with -gdwarf-2, I can call class methods from gdb, but I can't > print most structures OK, that's really odd. > - calling global functions from the debugger takes a long time and uses > a lot of memory. calling class methods is fast however. I swear I'd resolved this. Must be a new problem. > - it is difficult to call template methods from the debugger Yes. > All these issues were not present using g++ 2.8.1 and gdb 4.17. In > that environment most things worked well Although gdb 4.17 did crash > a little too often, it was much more functional. It had nothing to do with GDB. C++ was a simpler thing, then. A lot simpler. > We can't go back to those old tools because our C++ & STL usage goes > beyond the capabilities of g++ 2.8.1 & 2.9.*. > > I can give testcases for all these things but it's really pretty > basic C++ debugging. > > Is this enough information? Is there a path through these tools that > works -- e.g. config options, versions, etc? I'd appreciate small testcases for every one of these problems, if you can manage it. We'll see what we can do. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer