From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20708 invoked by alias); 11 Feb 2008 13:08:20 -0000 Received: (qmail 20697 invoked by uid 22791); 11 Feb 2008 13:08:20 -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 13:08:00 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 7950298036; Mon, 11 Feb 2008 13:07:58 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 602D69801D; Mon, 11 Feb 2008 13:07:58 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1JOYO5-00026t-DD; Mon, 11 Feb 2008 08:07:57 -0500 Date: Mon, 11 Feb 2008 13:08: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: <20080211130757.GB7796@caradoc.them.org> Mail-Followup-To: Stefan Bylund , gdb@sourceware.org References: <47B02B7D.40204@enea.se> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47B02B7D.40204@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/msg00058.txt.bz2 On Mon, Feb 11, 2008 at 12:03:25PM +0100, Stefan Bylund wrote: > Hi, > > We recently upgraded from GDB 6.3 to GDB 6.7.1 and noticed that for > PowerPC we can longer get a backtrace in certain cases. The problem is > that when we initially attach to an existing process on a remote target, > only the PC and SP registers are available. This worked fine with GDB 6.3 > when doing a backtrace. However, GDB 6.7.1 fails when doing a backtrace in > this case, and it seems that it tries to use the framepointer register > (R31) for doing the backtrace and since this register is not available > (i.e. it has value 0 in GDB's perspective), the backtrace fails. > > Does GDB 6.7.1 requires the framepoint register (R31) for doing a backtrace? It depends on your program and the available symbols and unwind information. For instance, it will use DWARF unwind tables if they are provided. > I have also noticed that if I don't install the dwarf2_frame_sniffer() > and rs6000_adjust_frame_regnum() functions in rs6000_gdbarch_init() in > rs6000-tdep.c, the backtrace works again even if the framepointer > register is not available. However, I'm not sure exactly why... Is it > safe to omit these two functions? It sounds to me like you have DWARF information that says to use the frame pointer. Do you know if that's true? -- Daniel Jacobowitz CodeSourcery