aboutsummaryrefslogtreecommitdiff
path: root/linux-user/main.c
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-14 17:05:54 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-14 17:05:54 +0000
commit71f75756c9aa40db0eb08d44adc57085fa0b6131 (patch)
treea6098f468fab5a94a5a93d8bcf699f8d1d63026a /linux-user/main.c
parent1ab5f75cf04175ec430ba6d2bbe1e522d70a2498 (diff)
downloadqemu-71f75756c9aa40db0eb08d44adc57085fa0b6131.zip
qemu-71f75756c9aa40db0eb08d44adc57085fa0b6131.tar.gz
qemu-71f75756c9aa40db0eb08d44adc57085fa0b6131.tar.bz2
ppc-linux-user: handle EXCP_DEBUG
Replace POWERPC_EXCP_DEBUG by EXCP_DEBUG as the former can not happen in user mode emulation, while the later can happen and should be handled. Noticed by Andrew Stubbs. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5721 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user/main.c')
-rw-r--r--linux-user/main.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index 7b57de3..f17d012 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -1283,20 +1283,6 @@ void cpu_loop(CPUPPCState *env)
cpu_abort(env, "Instruction TLB exception while in user mode. "
"Aborting\n");
break;
- case POWERPC_EXCP_DEBUG: /* Debug interrupt */
- /* XXX: check this */
- {
- 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(env, info.si_signo, &info);
- }
- }
- break;
case POWERPC_EXCP_SPEU: /* SPE/embedded floating-point unavail. */
EXCP_DUMP(env, "No SPE/floating-point instruction allowed\n");
info.si_signo = TARGET_SIGILL;
@@ -1453,6 +1439,19 @@ void cpu_loop(CPUPPCState *env)
printf("syscall returned 0x%08x (%d)\n", ret, ret);
#endif
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(env, info.si_signo, &info);
+ }
+ }
+ break;
case EXCP_INTERRUPT:
/* just indicate that signals should be handled asap */
break;