From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17532 invoked by alias); 19 Jul 2006 17:33:13 -0000 Received: (qmail 17523 invoked by uid 22791); 19 Jul 2006 17:33:12 -0000 X-Spam-Check-By: sourceware.org Received: from mx.transitive.com (HELO pennyblack.transitives.com) (217.207.128.220) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 19 Jul 2006 17:33:10 +0000 Received: from internal.transitives.com ([172.16.0.1] helo=okra.transitives.com) by pennyblack.transitives.com with esmtp (Exim 4.50) id 1G3Flp-0003fC-8o; Wed, 19 Jul 2006 18:23:39 +0100 Subject: Re: Gcc options for improving debugging? From: Alex Bennee Reply-To: kernel-hacker@bennee.com To: Daniel Jacobowitz Cc: gdb@sources.redhat.com In-Reply-To: <20060719130547.GA18159@nevyn.them.org> References: <1153308778.9831.49.camel@okra.transitives.com> <20060719130547.GA18159@nevyn.them.org> Content-Type: text/plain Date: Wed, 19 Jul 2006 17:50:00 -0000 Message-Id: <1153330383.9831.82.camel@okra.transitives.com> Mime-Version: 1.0 X-Mailer: Evolution 2.4.0 Content-Transfer-Encoding: 7bit X-Spam-Score: -5.9 (-----) 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/msg00138.txt.bz2 On Wed, 2006-07-19 at 09:05 -0400, Daniel Jacobowitz wrote: > 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. I was wondering what the difference was between that and -g3. Thanks. > > > * -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. Is it the inlineing that's causing the variables to get optimised away??? That's my biggest problem at the moment. -- Alex, homepage: http://www.bennee.com/~alex/ The new Congressmen say they're going to turn the government around. I hope I don't get run over again.