diff mbox

[2/7] alpha-linux-user: Fix siginfo.si_addr for SIGSEGV and SIGBUS.

Message ID 1272906475-14480-3-git-send-email-rth@twiddle.net
State New
Headers show

Commit Message

Richard Henderson May 3, 2010, 5:07 p.m. UTC
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 linux-user/main.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/linux-user/main.c b/linux-user/main.c
index 18b52c0..e35c124 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -2434,7 +2434,7 @@  void cpu_loop (CPUState *env)
             info.si_signo = TARGET_SIGSEGV;
             info.si_errno = 0;
             info.si_code = 0;  /* ??? SEGV_MAPERR vs SEGV_ACCERR.  */
-            info._sifields._sigfault._addr = env->pc;
+            info._sifields._sigfault._addr = env->ipr[IPR_EXC_ADDR];
             queue_signal(env, info.si_signo, &info);
             break;
         case EXCP_DTB_MISS_PAL:
@@ -2458,7 +2458,7 @@  void cpu_loop (CPUState *env)
             info.si_signo = TARGET_SIGBUS;
             info.si_errno = 0;
             info.si_code = TARGET_BUS_ADRALN;
-            info._sifields._sigfault._addr = env->pc;
+            info._sifields._sigfault._addr = env->ipr[IPR_EXC_ADDR];
             queue_signal(env, info.si_signo, &info);
             break;
         case EXCP_OPCDEC: