From: Vladimir Prus <vladimir@codesourcery.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] Fix SH4 single-stepping.
Date: Sun, 12 Oct 2008 19:16:43 +0400 [thread overview]
Message-ID: <200810121916.43846.vladimir@codesourcery.com> (raw)
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
next reply other threads:[~2008-10-12 15:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-12 15:16 Vladimir Prus [this message]
2008-10-12 23:31 ` [Qemu-devel] [PATCH] Fix SH4 single-stepping Aurelien Jarno
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200810121916.43846.vladimir@codesourcery.com \
--to=vladimir@codesourcery.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.