mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 18:23:57 -06:00
target/xtensa: use generic instruction breakpoint infrastructure
Don't embed ibreak exception generation into TB and don't invalidate TB on ibreak address change. Add CPUBreakpoint pointers to xtensa CPUArchState, use cpu_breakpoint_insert/cpu_breakpoint_remove_by_ref to manage ibreak breakpoints and provide TCGCPUOps::debug_check_breakpoint callback that recognizes valid instruction breakpoints. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20231130171920.3798954-2-jcmvbkbc@gmail.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
parent
396f66f99d
commit
5f3ebbc86d
5 changed files with 47 additions and 33 deletions
|
@ -1123,19 +1123,6 @@ static inline unsigned xtensa_insn_len(CPUXtensaState *env, DisasContext *dc)
|
|||
return xtensa_op0_insn_len(dc, b0);
|
||||
}
|
||||
|
||||
static void gen_ibreak_check(CPUXtensaState *env, DisasContext *dc)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i < dc->config->nibreak; ++i) {
|
||||
if ((env->sregs[IBREAKENABLE] & (1 << i)) &&
|
||||
env->sregs[IBREAKA + i] == dc->pc) {
|
||||
gen_debug_exception(dc, DEBUGCAUSE_IB);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void xtensa_tr_init_disas_context(DisasContextBase *dcbase,
|
||||
CPUState *cpu)
|
||||
{
|
||||
|
@ -1205,10 +1192,6 @@ static void xtensa_tr_translate_insn(DisasContextBase *dcbase, CPUState *cpu)
|
|||
gen_set_label(label);
|
||||
}
|
||||
|
||||
if (dc->debug) {
|
||||
gen_ibreak_check(env, dc);
|
||||
}
|
||||
|
||||
disas_xtensa_insn(env, dc);
|
||||
|
||||
if (dc->icount) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue