[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] alpha-linux-user: Fill in SI_CODE for SIGSEGV.
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH] alpha-linux-user: Fill in SI_CODE for SIGSEGV. |
Date: |
Fri, 21 May 2010 10:03:33 -0700 |
Signed-off-by: Richard Henderson <address@hidden>
---
linux-user/main.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/linux-user/main.c b/linux-user/main.c
index b240f29..de1076b 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;
--
1.7.0.1
- [Qemu-devel] [PATCH] alpha-linux-user: Fill in SI_CODE for SIGSEGV.,
Richard Henderson <=