This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA/commit] Fix SP register unwinding on alpha-tru64
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: brobecker at adacore dot com (Joel Brobecker)
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 29 May 2008 23:32:09 +0200 (CEST)
- Subject: Re: [RFA/commit] Fix SP register unwinding on alpha-tru64
Joel Brobecker wrote:
> Index: alpha-tdep.c
> ===================================================================
> --- alpha-tdep.c (revision 131678)
> +++ alpha-tdep.c (working copy)
> @@ -1175,6 +1175,10 @@ alpha_heuristic_frame_prev_register (str
> struct alpha_heuristic_unwind_cache *info
> = alpha_heuristic_frame_unwind_cache (this_frame, this_prologue_cache, 0);
>
> + /* The stack pointer of the previous frame is this frame's vfp. */
> + if (regnum == ALPHA_SP_REGNUM)
> + return frame_unwind_got_constant (this_frame, regnum, info->vfp);
> +
> /* The PC of the previous frame is stored in the link register of
> the current frame. Frob regnum so that we pull the value from
> the correct place. */
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?
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com