aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2006-06-17 19:58:25 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2006-06-17 19:58:25 +0000
commit355fb23d83aad9ffae376cac09c6b52656e7d083 (patch)
tree6d4279f10b498a5723c0d829887557e46517cf62 /linux-user
parent9854bc4662906a60c35c64c1e5b4d76eee4ac631 (diff)
SH usermode fault handling.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1988 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/main.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index 5b4182bd8b..74642cc361 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -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);