From: Richard Henderson <rth@twiddle.net>
To: qemu-devel@nongnu.org
Cc: aurelien@aurel32.net
Subject: [Qemu-devel] [PATCH] alpha-linux-user: Fill in SI_CODE for SIGSEGV.
Date: Fri, 21 May 2010 10:03:33 -0700 [thread overview]
Message-ID: <1274461413-23443-1-git-send-email-rth@twiddle.net> (raw)
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
next reply other threads:[~2010-05-21 17:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-21 17:03 Richard Henderson [this message]
2010-05-28 22:09 ` [Qemu-devel] [PATCH] alpha-linux-user: Fill in SI_CODE for SIGSEGV Aurelien Jarno
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1274461413-23443-1-git-send-email-rth@twiddle.net \
--to=rth@twiddle.net \
--cc=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).