From c3b5bc8ab325bd3aee46ea5c0884c9e6f1636ccb Mon Sep 17 00:00:00 2001 From: ths Date: Sun, 2 Dec 2007 06:31:25 +0000 Subject: SH4: Signal handling for the user space emulator, by Magnus Damm. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3764 c046a42c-6fe2-441c-8c8c-71466251a162 --- linux-user/main.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'linux-user/main.c') diff --git a/linux-user/main.c b/linux-user/main.c index cfc9065a51..379ac2962d 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -1617,6 +1617,9 @@ void cpu_loop (CPUState *env) env->gregs[0] = ret; env->pc += 2; break; + case EXCP_INTERRUPT: + /* just indicate that signals should be handled asap */ + break; case EXCP_DEBUG: { int sig; @@ -1631,6 +1634,15 @@ void cpu_loop (CPUState *env) } } break; + case 0xa0: + case 0xc0: + info.si_signo = SIGSEGV; + info.si_errno = 0; + info.si_code = TARGET_SEGV_MAPERR; + info._sifields._sigfault._addr = env->tea; + queue_signal(info.si_signo, &info); + break; + default: printf ("Unhandled trap: 0x%x\n", trapnr); cpu_dump_state(env, stderr, fprintf, 0); -- cgit v1.2.3