* [Qemu-devel] [PATCH] alpha-linux-user: Fill in SI_CODE for SIGSEGV.
@ 2010-05-21 17:03 Richard Henderson
2010-05-28 22:09 ` Aurelien Jarno
0 siblings, 1 reply; 2+ messages in thread
From: Richard Henderson @ 2010-05-21 17:03 UTC (permalink / raw)
To: qemu-devel; +Cc: aurelien
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] alpha-linux-user: Fill in SI_CODE for SIGSEGV.
2010-05-21 17:03 [Qemu-devel] [PATCH] alpha-linux-user: Fill in SI_CODE for SIGSEGV Richard Henderson
@ 2010-05-28 22:09 ` Aurelien Jarno
0 siblings, 0 replies; 2+ messages in thread
From: Aurelien Jarno @ 2010-05-28 22:09 UTC (permalink / raw)
To: Richard Henderson; +Cc: qemu-devel
On Fri, May 21, 2010 at 10:03:33AM -0700, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <rth@twiddle.net>
> ---
> linux-user/main.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
Thanks, applied.
> 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
>
>
>
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-05-28 22:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-21 17:03 [Qemu-devel] [PATCH] alpha-linux-user: Fill in SI_CODE for SIGSEGV Richard Henderson
2010-05-28 22:09 ` Aurelien Jarno
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).