From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4901 invoked by alias); 12 Feb 2008 10:24:27 -0000 Received: (qmail 4861 invoked by uid 22791); 12 Feb 2008 10:24:23 -0000 X-Spam-Check-By: sourceware.org Received: from mx-1.enea.se (HELO mx-1.enea.se) (192.36.1.70) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 12 Feb 2008 10:23:50 +0000 Received: from mx-2.enea.se ([172.21.1.82]) by mx-1.enea.se with Microsoft SMTPSVC(6.0.3790.1830); Tue, 12 Feb 2008 11:23:46 +0100 Received: from [127.0.0.1] ([172.16.140.117]) by mx-2.enea.se over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Tue, 12 Feb 2008 11:23:47 +0100 Message-ID: <47B173B3.3090801@enea.se> Date: Tue, 12 Feb 2008 10:24:00 -0000 From: Stefan Bylund User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) MIME-Version: 1.0 To: gdb@sourceware.org Subject: Re: Does GDB 6.7.1 for PowerPC require the framepointer register for backtracing? References: <47B02B7D.40204@enea.se> <20080211130757.GB7796@caradoc.them.org> <47B085BF.7090909@enea.se> <20080211173303.GA19507@caradoc.them.org> In-Reply-To: <20080211173303.GA19507@caradoc.them.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00065.txt.bz2 Hi Daniel, Thanks for all your valuable answers! We will use -fomit-frame-pointer as a workaround for now. Later on we will add support for handling the frame pointer register in our OS kernel. That seems to be the future-proof solution. Regards, Stefan Daniel Jacobowitz wrote: >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. > > > -- --------------------------------- Stefan Bylund Senior Software Engineer Enea Skalholtsgatan 9, Box 1033, SE-164 21 Kista, Sweden Direct: +46 8 50 71 43 25 Mobile: +46 709 71 43 25 stefan.bylund@enea.com www.enea.com --------------------------------- Enea - Embedded for Leaders ---------------------------------