mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-16 14:41:55 -06:00
SH usermode fault handling.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1988 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
9854bc4662
commit
355fb23d83
4 changed files with 81 additions and 27 deletions
|
@ -1362,7 +1362,7 @@ void cpu_loop(CPUMIPSState *env)
|
|||
void cpu_loop (CPUState *env)
|
||||
{
|
||||
int trapnr, ret;
|
||||
// target_siginfo_t info;
|
||||
target_siginfo_t info;
|
||||
|
||||
while (1) {
|
||||
trapnr = cpu_sh4_exec (env);
|
||||
|
@ -1380,6 +1380,20 @@ void cpu_loop (CPUState *env)
|
|||
env->gregs[0x10] = ret;
|
||||
env->pc += 2;
|
||||
break;
|
||||
case EXCP_DEBUG:
|
||||
{
|
||||
int sig;
|
||||
|
||||
sig = gdb_handlesig (env, TARGET_SIGTRAP);
|
||||
if (sig)
|
||||
{
|
||||
info.si_signo = sig;
|
||||
info.si_errno = 0;
|
||||
info.si_code = TARGET_TRAP_BRKPT;
|
||||
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