[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] m68k: fix 'bkpt' instruction in softmmu mode
From: |
Laurent Vivier |
Subject: |
[PATCH] m68k: fix 'bkpt' instruction in softmmu mode |
Date: |
Thu, 26 Jan 2023 13:52:34 +0100 |
In linux-user mode, 'bkpt' generates an EXP_DEBUG exception to allow
QEMU gdb server to intercept and manage the operation with an external
debugger.
In softmmu mode, the instruction must generate an illegal instruction
exception as it is on real hardware to be managed by the kernel.
Buglink: https://gitlab.com/qemu-project/qemu/-/issues/146
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
target/m68k/translate.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/target/m68k/translate.c b/target/m68k/translate.c
index 18418312b14b..31178c3b1d17 100644
--- a/target/m68k/translate.c
+++ b/target/m68k/translate.c
@@ -2774,7 +2774,11 @@ DISAS_INSN(swap)
DISAS_INSN(bkpt)
{
+#if defined(CONFIG_SOFTMMU)
+ gen_exception(s, s->base.pc_next, EXCP_ILLEGAL);
+#else
gen_exception(s, s->base.pc_next, EXCP_DEBUG);
+#endif
}
DISAS_INSN(pea)
--
2.38.1
- [PATCH] m68k: fix 'bkpt' instruction in softmmu mode,
Laurent Vivier <=