diff options
author | Matheus Ferst | 2022-01-13 18:04:54 +0100 |
---|---|---|
committer | Laurent Vivier | 2022-03-08 16:01:08 +0100 |
commit | 083fe9a12d2025bb719ce8fb8cef86266f9bdddd (patch) | |
tree | e30ddfc134a82f8e3a63c676358ff42bcfe05802 | |
parent | linux-user: Remove stale "not threadsafe" comments (diff) | |
download | qemu-083fe9a12d2025bb719ce8fb8cef86266f9bdddd.tar.gz qemu-083fe9a12d2025bb719ce8fb8cef86266f9bdddd.tar.xz qemu-083fe9a12d2025bb719ce8fb8cef86266f9bdddd.zip |
linux-user/ppc: deliver SIGTRAP on POWERPC_EXCP_TRAP
Handle POWERPC_EXCP_TRAP in cpu_loop to deliver SIGTRAP on tw[i]/td[i].
The si_code comes from do_program_check in the kernel source file
arch/powerpc/kernel/traps.c
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Message-Id: <20220113170456.1796911-2-matheus.ferst@eldorado.org.br>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
-rw-r--r-- | linux-user/ppc/cpu_loop.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/linux-user/ppc/cpu_loop.c b/linux-user/ppc/cpu_loop.c index c5d809916f..b468f199e4 100644 --- a/linux-user/ppc/cpu_loop.c +++ b/linux-user/ppc/cpu_loop.c @@ -181,7 +181,8 @@ void cpu_loop(CPUPPCState *env) } break; case POWERPC_EXCP_TRAP: - cpu_abort(cs, "Tried to call a TRAP\n"); + si_signo = TARGET_SIGTRAP; + si_code = TARGET_TRAP_BRKPT; break; default: /* Should not happen ! */ |