Commit 71f75756c9aa40db0eb08d44adc57085fa0b6131
1 parent
1ab5f75c
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
Showing
1 changed file
with
13 additions
and
14 deletions
linux-user/main.c
... | ... | @@ -1283,20 +1283,6 @@ void cpu_loop(CPUPPCState *env) |
1283 | 1283 | cpu_abort(env, "Instruction TLB exception while in user mode. " |
1284 | 1284 | "Aborting\n"); |
1285 | 1285 | break; |
1286 | - case POWERPC_EXCP_DEBUG: /* Debug interrupt */ | |
1287 | - /* XXX: check this */ | |
1288 | - { | |
1289 | - int sig; | |
1290 | - | |
1291 | - sig = gdb_handlesig(env, TARGET_SIGTRAP); | |
1292 | - if (sig) { | |
1293 | - info.si_signo = sig; | |
1294 | - info.si_errno = 0; | |
1295 | - info.si_code = TARGET_TRAP_BRKPT; | |
1296 | - queue_signal(env, info.si_signo, &info); | |
1297 | - } | |
1298 | - } | |
1299 | - break; | |
1300 | 1286 | case POWERPC_EXCP_SPEU: /* SPE/embedded floating-point unavail. */ |
1301 | 1287 | EXCP_DUMP(env, "No SPE/floating-point instruction allowed\n"); |
1302 | 1288 | info.si_signo = TARGET_SIGILL; |
... | ... | @@ -1453,6 +1439,19 @@ void cpu_loop(CPUPPCState *env) |
1453 | 1439 | printf("syscall returned 0x%08x (%d)\n", ret, ret); |
1454 | 1440 | #endif |
1455 | 1441 | break; |
1442 | + case EXCP_DEBUG: | |
1443 | + { | |
1444 | + int sig; | |
1445 | + | |
1446 | + sig = gdb_handlesig(env, TARGET_SIGTRAP); | |
1447 | + if (sig) { | |
1448 | + info.si_signo = sig; | |
1449 | + info.si_errno = 0; | |
1450 | + info.si_code = TARGET_TRAP_BRKPT; | |
1451 | + queue_signal(env, info.si_signo, &info); | |
1452 | + } | |
1453 | + } | |
1454 | + break; | |
1456 | 1455 | case EXCP_INTERRUPT: |
1457 | 1456 | /* just indicate that signals should be handled asap */ |
1458 | 1457 | break; | ... | ... |