aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDavid Daney <ddaney@avtrex.com>2006-11-20 19:49:08 +0000
committerDavid Daney <daney@gcc.gnu.org>2006-11-20 19:49:08 +0000
commit9e0881604966a3cdc06db1b06630b0ce2fd5da2e (patch)
tree0b8b10e14ec8c024d773738fd4cddb0142e18a7e /gcc
parente9057fe4ee3c43a4f89d75dd104230f46103c1a6 (diff)
downloadgcc-9e0881604966a3cdc06db1b06630b0ce2fd5da2e.zip
gcc-9e0881604966a3cdc06db1b06630b0ce2fd5da2e.tar.gz
gcc-9e0881604966a3cdc06db1b06630b0ce2fd5da2e.tar.bz2
mips-signal.h (sys/syscall.h): Do not include.
2006-11-20 David Daney <ddaney@avtrex.com> * include/mips-signal.h (sys/syscall.h): Do not include. (sig_ucontext_t): Removed. (MAKE_THROW_FRAME): Changed to be a nop. (_INIT_SIG_HANDLER): New macro. (INIT_SEGV): Rewrote to use _INIT_SIG_HANDLER. (INIT_FPE): Same. 2006-11-20 David Daney <ddaney@avtrex.com> * config/mips/linux-unwind.h (mips_fallback_frame_state): Adjust PC to point to following instruction. From-SVN: r119024
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/mips/linux-unwind.h11
2 files changed, 13 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3599191..b9c8558 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2006-11-20 David Daney <ddaney@avtrex.com>
+
+ * config/mips/linux-unwind.h (mips_fallback_frame_state): Adjust
+ PC to point to following instruction.
+
2006-11-20 Anatoly Sokolov <aesok@post.ru>
PR target/18553
diff --git a/gcc/config/mips/linux-unwind.h b/gcc/config/mips/linux-unwind.h
index bbb2445..e10fc76 100644
--- a/gcc/config/mips/linux-unwind.h
+++ b/gcc/config/mips/linux-unwind.h
@@ -1,5 +1,5 @@
/* DWARF2 EH unwinding support for MIPS Linux.
- Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GCC.
@@ -51,6 +51,7 @@ mips_fallback_frame_state (struct _Unwind_Context *context,
_Unwind_FrameState *fs)
{
u_int32_t *pc = (u_int32_t *) context->ra;
+ u_int32_t t;
struct sigcontext *sc;
_Unwind_Ptr new_cfa;
int i;
@@ -102,9 +103,13 @@ mips_fallback_frame_state (struct _Unwind_Context *context,
fs->regs.reg[i].loc.offset
= (_Unwind_Ptr)&(sc->sc_regs[i]) - new_cfa;
}
- fs->regs.reg[SIGNAL_UNWIND_RETURN_COLUMN].how = REG_SAVED_OFFSET;
+ /* The PC points to the faulting instruction, but the unwind tables
+ expect it point to the following instruction. We compensate by
+ reporting a return address at the next instruction. */
+ fs->regs.reg[SIGNAL_UNWIND_RETURN_COLUMN].how = REG_SAVED_VAL_OFFSET;
+ t = (*(u_int32_t *)(void *)&sc->sc_pc) + 4;
fs->regs.reg[SIGNAL_UNWIND_RETURN_COLUMN].loc.offset
- = (_Unwind_Ptr)&(sc->sc_pc) - new_cfa;
+ = (_Unwind_Ptr)t - new_cfa;
fs->retaddr_column = SIGNAL_UNWIND_RETURN_COLUMN;
return _URC_NO_REASON;