Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA/commit] Fix SP register unwinding on alpha-tru64
Date: Sat, 31 May 2008 06:46:00 -0000	[thread overview]
Message-ID: <20080530152030.GB3601@adacore.com> (raw)
In-Reply-To: <200805292132.m4TLW9TA009207@d12av02.megacenter.de.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 770 bytes --]

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  <brobecker@adacore.com>

        * 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

[-- Attachment #2: alpha-tdep.c.diff --]
[-- Type: text/plain, Size: 581 bytes --]

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;
 }
 

      reply	other threads:[~2008-05-30 15:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-30 15:13 Joel Brobecker
2008-05-30 15:20 ` Ulrich Weigand
2008-05-31  6:46   ` Joel Brobecker [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080530152030.GB3601@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=uweigand@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox