From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28590 invoked by alias); 19 Jul 2006 13:05:58 -0000 Received: (qmail 28541 invoked by uid 22791); 19 Jul 2006 13:05:57 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Wed, 19 Jul 2006 13:05:50 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1G3BkK-0004k1-Ha; Wed, 19 Jul 2006 09:05:48 -0400 Date: Wed, 19 Jul 2006 13:31:00 -0000 From: Daniel Jacobowitz To: Alex Bennee Cc: gdb@sources.redhat.com Subject: Re: Gcc options for improving debugging? Message-ID: <20060719130547.GA18159@nevyn.them.org> Mail-Followup-To: Alex Bennee , gdb@sources.redhat.com References: <1153308778.9831.49.camel@okra.transitives.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1153308778.9831.49.camel@okra.transitives.com> User-Agent: Mutt/1.5.11+cvs20060403 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-07/txt/msg00136.txt.bz2 On Wed, Jul 19, 2006 at 12:32:58PM +0100, Alex Bennee wrote: > An alternate approach is to compile with -O3 but turn off specific > optimisations which make life tricky for gdb. So far I have: > > * -ggdb3 (obviously) This doesn't really give you anything beyond -g. The only difference is that it will allow you to expand macros, and make your object files huge. > * -fno-omit-frame-pointer (seems to help with finding some variables) > > What else would you suggest? Would this be worth adding to section 4.1 > of the manual "Compiling for debugging". Beyond this there's not really much you can do. If you need inlining, you're in trouble, because GDB does not (yet) have decent inlining support - but it's on the list of things to improve. -- Daniel Jacobowitz CodeSourcery