[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 29/35] i386: fix breakpoints handling in icount mode
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 29/35] i386: fix breakpoints handling in icount mode |
Date: |
Fri, 31 Oct 2014 18:26:07 +0100 |
From: Pavel Dovgalyuk <address@hidden>
This patch fixes instructions counting when execution is stopped on
breakpoint (e.g. set from gdb). Without a patch extra instruction is translated
and icount is incremented by invalid value (which equals to number of
executed instructions + 1).
Signed-off-by: Pavel Dovgalyuk <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Pavel Dovgalyuk <address@hidden>
---
target-i386/translate.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/target-i386/translate.c b/target-i386/translate.c
index 418173e..782f7d2 100644
--- a/target-i386/translate.c
+++ b/target-i386/translate.c
@@ -7987,7 +7987,7 @@ static inline void gen_intermediate_code_internal(X86CPU
*cpu,
if (bp->pc == pc_ptr &&
!((bp->flags & BP_CPU) && (tb->flags & HF_RF_MASK))) {
gen_debug(dc, pc_ptr - dc->cs_base);
- break;
+ goto done_generating;
}
}
}
@@ -8038,6 +8038,7 @@ static inline void gen_intermediate_code_internal(X86CPU
*cpu,
}
if (tb->cflags & CF_LAST_IO)
gen_io_end();
+done_generating:
gen_tb_end(tb, num_insns);
*tcg_ctx.gen_opc_ptr = INDEX_op_end;
/* we don't forget to fill the last values */
--
1.8.3.1
- [Qemu-devel] [PULL 19/35] kvmvapic: patch_instruction fix, (continued)
- [Qemu-devel] [PULL 19/35] kvmvapic: patch_instruction fix, Paolo Bonzini, 2014/10/31
- [Qemu-devel] [PULL 20/35] iscsi: Refuse to open as writable if the LUN is write protected, Paolo Bonzini, 2014/10/31
- [Qemu-devel] [PULL 21/35] virtio-scsi: Fix memory leak when realize failed, Paolo Bonzini, 2014/10/31
- [Qemu-devel] [PULL 22/35] scsi: devirtualize unrealize of SCSI devices, Paolo Bonzini, 2014/10/31
- [Qemu-devel] [PULL 23/35] virtio-scsi: Fix num_queue input validation, Paolo Bonzini, 2014/10/31
- [Qemu-devel] [PULL 24/35] kvm_stat: Only consider online cpus, Paolo Bonzini, 2014/10/31
- [Qemu-devel] [PULL 25/35] kvm_stat: Fix the non-x86 exit reasons, Paolo Bonzini, 2014/10/31
- [Qemu-devel] [PULL 26/35] kvm_stat: Rework platform detection, Paolo Bonzini, 2014/10/31
- [Qemu-devel] [PULL 27/35] kvm_stat: Abstract ioctl numbers, Paolo Bonzini, 2014/10/31
- [Qemu-devel] [PULL 28/35] kvm_stat: Add powerpc support, Paolo Bonzini, 2014/10/31
- [Qemu-devel] [PULL 29/35] i386: fix breakpoints handling in icount mode,
Paolo Bonzini <=
- [Qemu-devel] [PULL 32/35] ivshmem: Fix potential OOB r/w access, Paolo Bonzini, 2014/10/31
- [Qemu-devel] [PULL 33/35] ivshmem: Fix fd leak on error, Paolo Bonzini, 2014/10/31
- [Qemu-devel] [PULL 30/35] ivshmem: Check ivshmem_read() size argument, Paolo Bonzini, 2014/10/31
- [Qemu-devel] [PULL 34/35] ivshmem: use error_report, Paolo Bonzini, 2014/10/31
- [Qemu-devel] [PULL 35/35] virtio-scsi: fix dataplane, Paolo Bonzini, 2014/10/31
- [Qemu-devel] [PULL 31/35] ivshmem: validate incoming_posn value from server, Paolo Bonzini, 2014/10/31