aboutsummaryrefslogtreecommitdiff
path: root/target-openrisc/translate.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-openrisc/translate.c')
-rw-r--r--target-openrisc/translate.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/target-openrisc/translate.c b/target-openrisc/translate.c
index b66fde18fe..606490a47b 100644
--- a/target-openrisc/translate.c
+++ b/target-openrisc/translate.c
@@ -1665,6 +1665,11 @@ void gen_intermediate_code(CPUOpenRISCState *env, struct TranslationBlock *tb)
tcg_gen_movi_tl(cpu_pc, dc->pc);
gen_exception(dc, EXCP_DEBUG);
dc->is_jmp = DISAS_UPDATE;
+ /* 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. */
+ dc->pc += 4;
break;
}