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
This commit is contained in:
ths 2007-12-02 06:31:25 +00:00
parent 03aa197628
commit c3b5bc8ab3
4 changed files with 331 additions and 13 deletions

View file

@ -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);