From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17086 invoked by alias); 30 May 2008 15:20:52 -0000 Received: (qmail 17068 invoked by uid 22791); 30 May 2008 15:20:51 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 30 May 2008 15:20:34 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 882AE2A96E0; Fri, 30 May 2008 11:20:32 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 8BdJOtSLF9pb; Fri, 30 May 2008 11:20:32 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 520182A96CA; Fri, 30 May 2008 11:20:32 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 40D45E7ACD; Fri, 30 May 2008 08:20:30 -0700 (PDT) Date: Sat, 31 May 2008 06:46:00 -0000 From: Joel Brobecker To: Ulrich Weigand Cc: gdb-patches@sourceware.org Subject: Re: [RFA/commit] Fix SP register unwinding on alpha-tru64 Message-ID: <20080530152030.GB3601@adacore.com> References: <20080529205215.GG13826@adacore.com> <200805292132.m4TLW9TA009207@d12av02.megacenter.de.ibm.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="5mCyUwZo2JvN/JJP" Content-Disposition: inline In-Reply-To: <200805292132.m4TLW9TA009207@d12av02.megacenter.de.ibm.com> User-Agent: Mutt/1.4.2.2i Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-05/txt/msg00775.txt.bz2 --5mCyUwZo2JvN/JJP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 770 Thanks for the feedback, Ulrich. > Hmm, in alpha-mdebug-tdep.c this is now implemented as: > > /* The stack pointer of the previous frame is computed by popping > the current stack frame. */ > if (!trad_frame_addr_p (info->saved_regs, ALPHA_SP_REGNUM)) > trad_frame_set_value (info->saved_regs, ALPHA_SP_REGNUM, vfp); > > at the end of alpha_mdebug_frame_unwind_cache ... > > Should the two files use the same method here? I agree. I think that the mdebug approach is a little cleaner, so how about the attached? 2008-05-30 Joel Brobecker * alpha-tdep.c (alpha_heuristic_frame_unwind_cache): Set the trad-frame register value for the SP register. Tested on alpha-tru64 with the AdaCore testsuite. -- Joel --5mCyUwZo2JvN/JJP Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="alpha-tdep.c.diff" Content-length: 581 Index: alpha-tdep.c =================================================================== --- alpha-tdep.c (revision 131933) +++ alpha-tdep.c (working copy) @@ -1149,6 +1149,11 @@ alpha_heuristic_frame_unwind_cache (stru if (trad_frame_addr_p(info->saved_regs, reg)) info->saved_regs[reg].addr += val - 1; + /* The stack pointer of the previous frame is computed by popping + the current stack frame. */ + if (!trad_frame_addr_p (info->saved_regs, ALPHA_SP_REGNUM)) + trad_frame_set_value (info->saved_regs, ALPHA_SP_REGNUM, info->vfp); + return info; } --5mCyUwZo2JvN/JJP--