From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13936 invoked by alias); 11 Feb 2008 17:33:33 -0000 Received: (qmail 13926 invoked by uid 22791); 11 Feb 2008 17:33:32 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 11 Feb 2008 17:33:06 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 4FD1498036; Mon, 11 Feb 2008 17:33:04 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 290479801D; Mon, 11 Feb 2008 17:33:04 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1JOcWd-00058V-6z; Mon, 11 Feb 2008 12:33:03 -0500 Date: Mon, 11 Feb 2008 17:33:00 -0000 From: Daniel Jacobowitz To: Stefan Bylund Cc: gdb@sourceware.org Subject: Re: Does GDB 6.7.1 for PowerPC require the framepointer register for backtracing? Message-ID: <20080211173303.GA19507@caradoc.them.org> Mail-Followup-To: Stefan Bylund , gdb@sourceware.org References: <47B02B7D.40204@enea.se> <20080211130757.GB7796@caradoc.them.org> <47B085BF.7090909@enea.se> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47B085BF.7090909@enea.se> User-Agent: Mutt/1.5.17 (2007-12-11) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-02/txt/msg00060.txt.bz2 On Mon, Feb 11, 2008 at 06:28:31PM +0100, Stefan Bylund wrote: > Hi Daniel, > > Thanks for your information. We use GCC 3.4.4, and when debugging we use > the compiler options -g -O0. I tried to add the compiler option > -fomit-frame-pointer (which seems to be included by -O1 and higher but > not by -O0) and then it works!!! So, my conclusion is that GDB 6.7.1 for > PowerPC tries to take advantage of frame pointer information in the > DWARF-2 debug information while GDB 6.3 does not. Is that correct? Is it > always safe to use -fomit-frame-pointer on PowerPC, i.e. will it not make > some type of C/C++ code undebuggable? GDB 6.7 does use DWARF. GDB 6.3 did not. It sounds to me like you have a bug in the debug information generated by your compiler. I've seen some other bugs in the unwind tables generated by GCC 3.4.x that were fixed in GCC 4.x. -fomit-frame-pointer should not cause a problem for GDB as long as you have valid DWARF information. -- Daniel Jacobowitz CodeSourcery