]> Git Repo - qemu.git/blobdiff - target-xtensa/translate.c
target-*: Advance pc after recognizing a breakpoint
[qemu.git] / target-xtensa / translate.c
index aa0c527dc42dc45d94d4c9c33b06b1183601c55c..06b01634125702b05f2042cd3fa4241664788848 100644 (file)
@@ -3088,6 +3088,11 @@ void gen_intermediate_code(CPUXtensaState *env, TranslationBlock *tb)
             tcg_gen_movi_i32(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 += 2;
             break;
         }
 
This page took 0.023405 seconds and 4 git commands to generate.