[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 12/40] bsd-user/arm/arget_arch_cpu.h: Move EXCP_DEBUG and EXCP_BKP
From: |
Warner Losh |
Subject: |
[PULL 12/40] bsd-user/arm/arget_arch_cpu.h: Move EXCP_DEBUG and EXCP_BKPT together |
Date: |
Mon, 31 Jan 2022 12:56:08 -0700 |
Implement EXCP_DEBUG and EXCP_BKPT the same, as is done in
linux-user. The prior adjustment of register 15 isn't needed, so remove
that. Remove a redunant comment (that code in FreeBSD never handled
break points). It's unclear why BKPT was an alias for system calls,
but FreeBSD doesn't do that today.
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
---
bsd-user/arm/target_arch_cpu.h | 22 ++--------------------
1 file changed, 2 insertions(+), 20 deletions(-)
diff --git a/bsd-user/arm/target_arch_cpu.h b/bsd-user/arm/target_arch_cpu.h
index b7f728fd667..05b19ce6119 100644
--- a/bsd-user/arm/target_arch_cpu.h
+++ b/bsd-user/arm/target_arch_cpu.h
@@ -65,19 +65,7 @@ static inline void target_cpu_loop(CPUARMState *env)
}
break;
case EXCP_SWI:
- case EXCP_BKPT:
{
- /*
- * system call
- * See arm/arm/trap.c cpu_fetch_syscall_args()
- */
- if (trapnr == EXCP_BKPT) {
- if (env->thumb) {
- env->regs[15] += 2;
- } else {
- env->regs[15] += 4;
- }
- }
n = env->regs[7];
if (bsd_type == target_freebsd) {
int ret;
@@ -172,14 +160,8 @@ static inline void target_cpu_loop(CPUARMState *env)
queue_signal(env, info.si_signo, &info);
break;
case EXCP_DEBUG:
- {
-
- info.si_signo = TARGET_SIGTRAP;
- info.si_errno = 0;
- info.si_code = TARGET_TRAP_BRKPT;
- info.si_addr = env->exception.vaddress;
- queue_signal(env, info.si_signo, &info);
- }
+ case EXCP_BKPT:
+ force_sig_fault(TARGET_SIGTRAP, TARGET_TRAP_BRKPT, env->regs[15]);
break;
case EXCP_YIELD:
/* nothing to do here for user-mode, just resume guest code */
--
2.33.1
- [PULL 10/40] bsd-user/signal.c: Implement cpu_loop_exit_sigsegv, (continued)
- [PULL 10/40] bsd-user/signal.c: Implement cpu_loop_exit_sigsegv, Warner Losh, 2022/01/31
- [PULL 07/40] bsd-user/arm/target_arch_cpu.h: Move EXCP_ATOMIC to match linux-user, Warner Losh, 2022/01/31
- [PULL 36/40] bsd-user/signal.c: implement do_sigaction, Warner Losh, 2022/01/31
- [PULL 37/40] bsd-user/signal.c: do_sigaltstack, Warner Losh, 2022/01/31
- [PULL 29/40] bsd-user/signal.c: Fill in queue_signal, Warner Losh, 2022/01/31
- [PULL 35/40] bsd-user/signal.c: implement do_sigreturn, Warner Losh, 2022/01/31
- [PULL 04/40] bsd-user/arm/signal.c: get_mcontext should zero vfp data, Warner Losh, 2022/01/31
- [PULL 19/40] bsd-user/host/arm/host-signal.h: Implement host_signal_*, Warner Losh, 2022/01/31
- [PULL 11/40] bsd-user/signal.c: implement cpu_loop_exit_sigbus, Warner Losh, 2022/01/31
- [PULL 05/40] bsd-user: Remove vestiges of signal queueing code, Warner Losh, 2022/01/31
- [PULL 12/40] bsd-user/arm/arget_arch_cpu.h: Move EXCP_DEBUG and EXCP_BKPT together,
Warner Losh <=
- [PULL 14/40] bsd-user/arm/target_arch_cpu.h: Use force_sig_fault for EXCP_UDEF, Warner Losh, 2022/01/31
- [PULL 21/40] bsd-user/host/x86_64/host-signal.h: Implement host_signal_*, Warner Losh, 2022/01/31
- [PULL 30/40] bsd-user/signal.c: sigset manipulation routines., Warner Losh, 2022/01/31
- [PULL 39/40] bsd-user: Rename arg name for target_cpu_reset to env, Warner Losh, 2022/01/31
- [PULL 26/40] bsd-user/signal.c: Implement host_signal_handler, Warner Losh, 2022/01/31
- [PULL 23/40] bsd-user: Add trace events for bsd-user, Warner Losh, 2022/01/31
- [PULL 31/40] bsd-user/signal.c: setup_frame, Warner Losh, 2022/01/31
- [PULL 17/40] bsd-user/signal.c: Implement signal_init(), Warner Losh, 2022/01/31
- [PULL 20/40] bsd-user/host/i386/host-signal.h: Implement host_signal_*, Warner Losh, 2022/01/31
- [PULL 02/40] bsd-user: Create setup_sigframe_arch to setup sigframe context, Warner Losh, 2022/01/31