aboutsummaryrefslogtreecommitdiff
path: root/linux-user/main.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2010-05-21 10:03:33 -0700
committerAurelien Jarno <aurelien@aurel32.net>2010-05-28 23:27:20 +0200
commit0be1d07c0e4fa7395aca5129cfc5bb9a0a94a78c (patch)
tree64f2e7e6f8f40bb856c50f189f616c8025a98655 /linux-user/main.c
parent680c877af48cf5f2fb4586f34c13fd21ce33bfec (diff)
alpha-linux-user: Fill in SI_CODE for SIGSEGV.
Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'linux-user/main.c')
-rw-r--r--linux-user/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index b240f290f7..de1076b0af 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -2433,7 +2433,8 @@ void cpu_loop (CPUState *env)
env->lock_addr = -1;
info.si_signo = TARGET_SIGSEGV;
info.si_errno = 0;
- info.si_code = 0; /* ??? SEGV_MAPERR vs SEGV_ACCERR. */
+ info.si_code = (page_get_flags(env->ipr[IPR_EXC_ADDR]) & PAGE_VALID
+ ? TARGET_SEGV_ACCERR : TARGET_SEGV_MAPERR);
info._sifields._sigfault._addr = env->ipr[IPR_EXC_ADDR];
queue_signal(env, info.si_signo, &info);
break;