aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorMatheus Ferst <matheus.ferst@eldorado.org.br>2022-01-13 14:04:54 -0300
committerLaurent Vivier <laurent@vivier.eu>2022-03-08 16:01:08 +0100
commit083fe9a12d2025bb719ce8fb8cef86266f9bdddd (patch)
treee30ddfc134a82f8e3a63c676358ff42bcfe05802 /linux-user
parent4ff17cf0aa8854941dc0538c74d4f1677a570575 (diff)
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>
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/ppc/cpu_loop.c3
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 ! */