Re: [PATCH] Fix hppa_linux_sigtramp_frame_unwind_cache

John David Anglin
2008-09-15T02:24:05Z

> No, you are correct. The long long field will be aligned at an 8-byte
> boundary. I will keep the pad.

Committed the following after retesting.

Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)

2008-09-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>

* hppa-linux-tdep.c (hppa_linux_sigtramp_frame_unwind_cache): Record
HPPA_IPSW_REGNUM and HPPA_SAR_REGNUM values.

Index: hppa-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/hppa-linux-tdep.c,v
retrieving revision 1.32
diff -u -3 -p -r1.32 hppa-linux-tdep.c
--- hppa-linux-tdep.c 14 Sep 2008 14:08:42 -0000 1.32
+++ hppa-linux-tdep.c 15 Sep 2008 00:50:52 -0000
@@ -227,7 +227,8 @@ hppa_linux_sigtramp_frame_unwind_cache (
/* Skip sc_flags. */
scptr += 4;

- /* GR[0] is the psw, we don't restore that. */
+ /* GR[0] is the psw. */
+ info->saved_regs[HPPA_IPSW_REGNUM].addr = scptr;
scptr += 4;

/* General registers. */
@@ -237,7 +238,7 @@ hppa_linux_sigtramp_frame_unwind_cache (
scptr += 4;
}

- /* Pad. */
+ /* Pad to long long boundary. */
scptr += 4;

/* FP regs; FP0-3 are not restored. */
@@ -262,6 +263,8 @@ hppa_linux_sigtramp_frame_unwind_cache (
info->saved_regs[HPPA_PCOQ_TAIL_REGNUM].addr = scptr;
scptr += 4;

+ info->saved_regs[HPPA_SAR_REGNUM].addr = scptr;
+
info->base = get_frame_register_unsigned (this_frame, HPPA_SP_REGNUM);

return info;