diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-12-02 06:31:25 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-12-02 06:31:25 +0000 |
commit | c3b5bc8ab325bd3aee46ea5c0884c9e6f1636ccb (patch) | |
tree | 67512177265b28092609beb04ff3a51ddd3398d8 /linux-user/main.c | |
parent | 03aa19762854bc4749fea52d7f2ba7d1077c036f (diff) |
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
Diffstat (limited to 'linux-user/main.c')
-rw-r--r-- | linux-user/main.c | 12 |
1 files changed, 12 insertions, 0 deletions
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); |