summaryrefslogtreecommitdiffstats
path: root/linux-user
diff options
context:
space:
mode:
authorpbrook2009-04-21 03:03:10 +0200
committerpbrook2009-04-21 03:03:10 +0200
commite4474235d8b0a3a8603dcce8088f2a282a4e4925 (patch)
treebf19209a8679c618e00cd6ce05685a775caf8447 /linux-user
parentFix target_siginfo ordering for MIPS. (diff)
downloadqemu-e4474235d8b0a3a8603dcce8088f2a282a4e4925.tar.gz
qemu-e4474235d8b0a3a8603dcce8088f2a282a4e4925.tar.xz
qemu-e4474235d8b0a3a8603dcce8088f2a282a4e4925.zip
MIPS: Raise SIGSEGV, not SIGILL when an access faults.
Signed-off-by: Paul Brook <paul@codesourcery.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7193 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index b6b02fd5a1..816e1fc665 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -1868,6 +1868,13 @@ void cpu_loop(CPUMIPSState *env)
break;
case EXCP_TLBL:
case EXCP_TLBS:
+ info.si_signo = TARGET_SIGSEGV;
+ info.si_errno = 0;
+ /* XXX: check env->error_code */
+ info.si_code = TARGET_SEGV_MAPERR;
+ info._sifields._sigfault._addr = env->CP0_BadVAddr;
+ queue_signal(env, info.si_signo, &info);
+ break;
case EXCP_CpU:
case EXCP_RI:
info.si_signo = TARGET_SIGILL;