aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-02-15 22:54:53 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-02-15 22:54:53 +0000
commit61ff6f58e90af68c572b29dccc537359b0ce1a1e (patch)
tree1e1c3da53f4a17957fd58d596ca7647cdb8a8de4 /linux-user
parent0bee699e1db8170071902dbbde9c6b932883a897 (diff)
downloadqemu-61ff6f58e90af68c572b29dccc537359b0ce1a1e.zip
qemu-61ff6f58e90af68c572b29dccc537359b0ce1a1e.tar.gz
qemu-61ff6f58e90af68c572b29dccc537359b0ce1a1e.tar.bz2
sparc sigsegv support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1293 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/main.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index f406f61..b3f88dd 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -476,6 +476,7 @@ static void flush_windows(CPUSPARCState *env)
void cpu_loop (CPUSPARCState *env)
{
int trapnr, ret;
+ target_siginfo_t info;
while (1) {
trapnr = cpu_sparc_exec (env);
@@ -510,6 +511,17 @@ void cpu_loop (CPUSPARCState *env)
case TT_WIN_UNF: /* window underflow */
restore_window(env);
break;
+ case TT_TFAULT:
+ case TT_DFAULT:
+ {
+ info.si_signo = SIGSEGV;
+ info.si_errno = 0;
+ /* XXX: check env->error_code */
+ info.si_code = TARGET_SEGV_MAPERR;
+ info._sifields._sigfault._addr = env->mmuregs[4];
+ queue_signal(info.si_signo, &info);
+ }
+ break;
case 0x100: // XXX, why do we get these?
break;
default: