aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>2005-02-11 01:46:20 +0000
committerJohn David Anglin <danglin@gcc.gnu.org>2005-02-11 01:46:20 +0000
commit9dcab61e1c7d555f1c5555dcb6a69f090fbca33c (patch)
tree2a0dcea9069260e4e3b28f6ab249e8f1643ff4e8
parent70ad1f9f9f1be78ab02e80b8e6e593d7518c6d25 (diff)
downloadgcc-9dcab61e1c7d555f1c5555dcb6a69f090fbca33c.zip
gcc-9dcab61e1c7d555f1c5555dcb6a69f090fbca33c.tar.gz
gcc-9dcab61e1c7d555f1c5555dcb6a69f090fbca33c.tar.bz2
linux-unwind.h (pa32_fallback_frame_state): Handle misaligned signal trampolines.
* pa/linux-unwind.h (pa32_fallback_frame_state): Handle misaligned signal trampolines. From-SVN: r94869
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/pa/linux-unwind.h17
2 files changed, 21 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1e4b5f6..34513ea 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2005-02-10 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * pa/linux-unwind.h (pa32_fallback_frame_state): Handle misaligned
+ signal trampolines.
+
2005-02-10 David Daney <ddaney@avtrex.com>
* config/alpha/linux-unwind.h: Add exception clause to copyright.
diff --git a/gcc/config/pa/linux-unwind.h b/gcc/config/pa/linux-unwind.h
index 25791e5..3e23f62 100644
--- a/gcc/config/pa/linux-unwind.h
+++ b/gcc/config/pa/linux-unwind.h
@@ -86,7 +86,22 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,
off = 10 * 4;
}
else
- return _URC_END_OF_STACK;
+ {
+ /* We may have to unwind through an alternate signal stack.
+ We assume that the alignment of the alternate signal stack
+ is BIGGEST_ALIGNMENT (i.e., that it has been allocated using
+ malloc). As a result, we can't distinguish trampolines
+ used prior to 2.6.5-rc2-pa4. However after 2.6.5-rc2-pa4,
+ the return address of a signal trampoline will be on an odd
+ word boundary and we can then determine the frame offset. */
+ sp = (unsigned long)context->ra;
+ pc = (unsigned int *)sp;
+ if ((pc[0] == 0x34190000 || pc[0] == 0x34190002) && (sp & 4))
+ off = 5 * 4;
+ else
+ return _URC_END_OF_STACK;
+ }
+
if (pc[1] != 0x3414015a
|| pc[2] != 0xe4008200
|| pc[3] != 0x08000240)