[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 23/30] linux-user/sparc: Use force_sig_fault
|
From: |
Laurent Vivier |
|
Subject: |
[PULL 23/30] linux-user/sparc: Use force_sig_fault |
|
Date: |
Tue, 11 Jan 2022 20:52:40 +0100 |
From: Richard Henderson <richard.henderson@linaro.org>
Use the new function instead of setting up a target_siginfo_t
and calling queue_signal. Fill in the missing PC for SIGTRAP.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220107213243.212806-24-richard.henderson@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
linux-user/sparc/cpu_loop.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/linux-user/sparc/cpu_loop.c b/linux-user/sparc/cpu_loop.c
index 8765ab60205c..baf3d9ae011f 100644
--- a/linux-user/sparc/cpu_loop.c
+++ b/linux-user/sparc/cpu_loop.c
@@ -155,7 +155,6 @@ void cpu_loop (CPUSPARCState *env)
CPUState *cs = env_cpu(env);
int trapnr;
abi_long ret;
- target_siginfo_t info;
while (1) {
cpu_exec_start(cs);
@@ -241,19 +240,10 @@ void cpu_loop (CPUSPARCState *env)
/* just indicate that signals should be handled asap */
break;
case TT_ILL_INSN:
- {
- info.si_signo = TARGET_SIGILL;
- info.si_errno = 0;
- info.si_code = TARGET_ILL_ILLOPC;
- info._sifields._sigfault._addr = env->pc;
- queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info);
- }
+ force_sig_fault(TARGET_SIGILL, TARGET_ILL_ILLOPC, env->pc);
break;
case EXCP_DEBUG:
- info.si_signo = TARGET_SIGTRAP;
- info.si_errno = 0;
- info.si_code = TARGET_TRAP_BRKPT;
- queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info);
+ force_sig_fault(TARGET_SIGTRAP, TARGET_TRAP_BRKPT, env->pc);
break;
case EXCP_ATOMIC:
cpu_exec_step_atomic(cs);
--
2.33.1
- [PULL 26/30] linux-user: Move target_struct.h generic definitions to generic/, (continued)
- [PULL 26/30] linux-user: Move target_struct.h generic definitions to generic/, Laurent Vivier, 2022/01/11
- [PULL 09/30] linux-user/i386: Split out maybe_handle_vm86_trap, Laurent Vivier, 2022/01/11
- [PULL 10/30] linux-user/i386: Use force_sig, force_sig_fault, Laurent Vivier, 2022/01/11
- [PULL 11/30] linux-user/m68k: Use force_sig_fault, Laurent Vivier, 2022/01/11
- [PULL 15/30] linux-user/mips: Use force_sig_fault, Laurent Vivier, 2022/01/11
- [PULL 07/30] linux-user: Remove TARGET_NSIGFPE, Laurent Vivier, 2022/01/11
- [PULL 17/30] target/mips: Extract trap code into env->error_code, Laurent Vivier, 2022/01/11
- [PULL 20/30] linux-user/riscv: Use force_sig_fault, Laurent Vivier, 2022/01/11
- [PULL 21/30] linux-user/s390x: Use force_sig_fault, Laurent Vivier, 2022/01/11
- [PULL 19/30] linux-user/ppc: Use force_sig_fault, Laurent Vivier, 2022/01/11
- [PULL 23/30] linux-user/sparc: Use force_sig_fault,
Laurent Vivier <=
- [PULL 22/30] linux-user/sh4: Use force_sig_fault, Laurent Vivier, 2022/01/11
- [PULL 25/30] linux-user/arm: Move target_oabi_flock64 out of target_structs.h, Laurent Vivier, 2022/01/11
- [PULL 29/30] linux-user: Implement PR_SET_PDEATHSIG, Laurent Vivier, 2022/01/11
- [PULL 28/30] linux-user: Map signal number in PR_GET_PDEATHSIG, Laurent Vivier, 2022/01/11
- [PULL 16/30] target/mips: Extract break code into env->error_code, Laurent Vivier, 2022/01/11
- Re: [PULL 00/30] Linux user for 7.0 patches, Peter Maydell, 2022/01/12