From 083fe9a12d2025bb719ce8fb8cef86266f9bdddd Mon Sep 17 00:00:00 2001 From: Matheus Ferst Date: Thu, 13 Jan 2022 14:04:54 -0300 Subject: 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 Signed-off-by: Matheus Ferst Message-Id: <20220113170456.1796911-2-matheus.ferst@eldorado.org.br> Signed-off-by: Laurent Vivier --- linux-user/ppc/cpu_loop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'linux-user') 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 ! */ -- cgit v1.2.3