* [Qemu-devel] [PATCH] Fix SH4 single-stepping.
@ 2008-10-12 15:16 Vladimir Prus
2008-10-12 23:31 ` Aurelien Jarno
0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Prus @ 2008-10-12 15:16 UTC (permalink / raw)
To: qemu-devel
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(-)
diff --git a/target-sh4/translate.c b/target-sh4/translate.c
index 82f4168..365936f 100644
--- a/target-sh4/translate.c
+++ b/target-sh4/translate.c
@@ -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) {
--
1.5.3.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] Fix SH4 single-stepping.
2008-10-12 15:16 [Qemu-devel] [PATCH] Fix SH4 single-stepping Vladimir Prus
@ 2008-10-12 23:31 ` Aurelien Jarno
0 siblings, 0 replies; 2+ messages in thread
From: Aurelien Jarno @ 2008-10-12 23:31 UTC (permalink / raw)
To: qemu-devel
On Sun, Oct 12, 2008 at 07:16:43PM +0400, Vladimir Prus wrote:
>
> 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.
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-10-12 23:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-12 15:16 [Qemu-devel] [PATCH] Fix SH4 single-stepping Vladimir Prus
2008-10-12 23:31 ` Aurelien Jarno
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).