summaryrefslogtreecommitdiff
path: root/target-i386
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2015-10-13 22:07:49 +0000
committerRichard Henderson <rth@twiddle.net>2015-10-28 10:57:16 -0700
commit522a0d4e3c0d397ffb45ec400d8cbd426dad9d17 (patch)
tree47bf23d369e201fe8e982097a5fdd5437f88bdfa /target-i386
parent496fedddce9a575111df4f912fb9e361037531ed (diff)
downloadqemu-522a0d4e3c0d397ffb45ec400d8cbd426dad9d17.tar.gz
qemu-522a0d4e3c0d397ffb45ec400d8cbd426dad9d17.tar.bz2
qemu-522a0d4e3c0d397ffb45ec400d8cbd426dad9d17.zip
target-*: Advance pc after recognizing a breakpoint
Some targets already had this within their logic, but make sure it's present for all targets. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target-i386')
-rw-r--r--target-i386/translate.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/target-i386/translate.c b/target-i386/translate.c
index 862f8e09fb..b400d2470a 100644
--- a/target-i386/translate.c
+++ b/target-i386/translate.c
@@ -7962,6 +7962,11 @@ void gen_intermediate_code(CPUX86State *env, TranslationBlock *tb)
tb->flags & HF_RF_MASK
? BP_GDB : BP_ANY))) {
gen_debug(dc, pc_ptr - dc->cs_base);
+ /* The address covered by the breakpoint must be included in
+ [tb->pc, tb->pc + tb->size) in order to for it to be
+ properly cleared -- thus we increment the PC here so that
+ the logic setting tb->size below does the right thing. */
+ pc_ptr += 1;
goto done_generating;
}
if (num_insns == max_insns && (tb->cflags & CF_LAST_IO)) {