Fix SH4 single-stepping.
PATCH 1/1 Fix SH4 single-stepping.
Presently, when connecting with GDB to sh4 system qemu emulator, single-stepping does not work -- we end up at the same instruction. Also, after breakpoint hit, continue does not work either -- because GDB tries to single-step over breakpoint, which is likewise broken.
This patch fixes the issue.
- Volodya
* target-sh/translate.c (gen_intermediate_code_internal): If singlestep is enabled, update PC before stopping.
--- target-sh4/translate.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
target-sh4/translate.c +1 -0
@@ -1867,6 +1867,7 @@ gen_intermediate_code_internal(CPUState * env, TranslationBlock * tb,if (tb->cflags &CF_LAST_IO )gen_io_end ();if (env->singlestep_enabled) { +tcg_gen_movi_i32 (cpu_pc, ctx.pc);tcg_gen_helper_0_0 (helper_debug); }else {switch (ctx.bstate) {
Signature · 1 line
1.5.3.5
Aurelien Jarno
AppliedQuoted 7 lines · Vladimir Prus
Presently, when connecting with GDB to sh4 system qemu emulator, single-stepping does not work -- we end up at the same instruction. Also, after breakpoint hit, continue does not work either -- because GDB tries to single-step over breakpoint, which is likewise broken.
This patch fixes the issue.
Thanks, applied.
Signature · 4 lines
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' [email protected] | [email protected] `- people.debian.org/~aurel32 | www.aurel32.net