aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2023-02-15 19:45:08 -1000
committerLaurent Vivier <laurent@vivier.eu>2023-03-10 20:45:47 +0100
commit52d104a5a5eaf0440369c20757ff5d170fd0ebc2 (patch)
tree961e96875042815f949d17a31eae04616b0beebe
parentd6b036378004c27579aa68bf0174e4e8fbfff726 (diff)
downloadqemu-52d104a5a5eaf0440369c20757ff5d170fd0ebc2.zip
qemu-52d104a5a5eaf0440369c20757ff5d170fd0ebc2.tar.gz
qemu-52d104a5a5eaf0440369c20757ff5d170fd0ebc2.tar.bz2
linux-user/sparc: Handle software breakpoint trap
This is 'ta 1' for both v9 and pre-v9. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230216054516.1267305-8-richard.henderson@linaro.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
-rw-r--r--linux-user/sparc/cpu_loop.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/linux-user/sparc/cpu_loop.c b/linux-user/sparc/cpu_loop.c
index edbc4f3..c14eaea 100644
--- a/linux-user/sparc/cpu_loop.c
+++ b/linux-user/sparc/cpu_loop.c
@@ -206,6 +206,11 @@ void cpu_loop (CPUSPARCState *env)
env->npc = env->npc + 4;
break;
+ case TT_TRAP + 0x01: /* breakpoint */
+ case EXCP_DEBUG:
+ force_sig_fault(TARGET_SIGTRAP, TARGET_TRAP_BRKPT, env->pc);
+ break;
+
case TT_TRAP + 0x03: /* flush windows */
flush_windows(env);
/* next instruction */
@@ -237,9 +242,6 @@ void cpu_loop (CPUSPARCState *env)
case TT_ILL_INSN:
force_sig_fault(TARGET_SIGILL, TARGET_ILL_ILLOPC, env->pc);
break;
- case EXCP_DEBUG:
- force_sig_fault(TARGET_SIGTRAP, TARGET_TRAP_BRKPT, env->pc);
- break;
case EXCP_ATOMIC:
cpu_exec_step_atomic(cs);
break;