aboutsummaryrefslogtreecommitdiff
path: root/bsd-user/arm
diff options
context:
space:
mode:
authorWarner Losh <imp@bsdimp.com>2022-01-08 16:11:15 -0700
committerWarner Losh <imp@bsdimp.com>2022-01-28 15:52:39 -0700
commita3ed97cee57279620d934642c6da1eb0c5ae9df2 (patch)
treeb8b14698ea6de9b46485da1ab5846beaa63f1004 /bsd-user/arm
parentcfdee273c4e41d0b485bc82966a82d6ab6f37a1d (diff)
downloadqemu-a3ed97cee57279620d934642c6da1eb0c5ae9df2.zip
qemu-a3ed97cee57279620d934642c6da1eb0c5ae9df2.tar.gz
qemu-a3ed97cee57279620d934642c6da1eb0c5ae9df2.tar.bz2
bsd-user/arm/arget_arch_cpu.h: Move EXCP_DEBUG and EXCP_BKPT together
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>
Diffstat (limited to 'bsd-user/arm')
-rw-r--r--bsd-user/arm/target_arch_cpu.h22
1 files changed, 2 insertions, 20 deletions
diff --git a/bsd-user/arm/target_arch_cpu.h b/bsd-user/arm/target_arch_cpu.h
index b7f728f..05b19ce 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 */