mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-28 21:03:54 -06:00
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:
parent
03aa197628
commit
c3b5bc8ab3
4 changed files with 331 additions and 13 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue