nemu: break before executing instruction
This commit is contained in:
parent
385d448746
commit
c9ad69a32d
1 changed files with 2 additions and 2 deletions
|
@ -158,8 +158,6 @@ breakpoint_t *cpu_exec_with_bp(uint64_t n, breakpoint_t *bp, size_t len) {
|
||||||
static Decode s;
|
static Decode s;
|
||||||
nemu_state.state = NEMU_RUNNING;
|
nemu_state.state = NEMU_RUNNING;
|
||||||
do {
|
do {
|
||||||
exec_once(&s, cpu.pc);
|
|
||||||
g_nr_guest_inst++;
|
|
||||||
for (int i = 0; i < len; i++) {
|
for (int i = 0; i < len; i++) {
|
||||||
size_t addr = bp[i].addr;
|
size_t addr = bp[i].addr;
|
||||||
bp_type_t bptype = bp[i].type;
|
bp_type_t bptype = bp[i].type;
|
||||||
|
@ -176,6 +174,8 @@ breakpoint_t *cpu_exec_with_bp(uint64_t n, breakpoint_t *bp, size_t len) {
|
||||||
return bp + i;
|
return bp + i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
exec_once(&s, cpu.pc);
|
||||||
|
g_nr_guest_inst++;
|
||||||
if (nemu_state.state != NEMU_RUNNING)
|
if (nemu_state.state != NEMU_RUNNING)
|
||||||
return NULL;
|
return NULL;
|
||||||
} while (--n);
|
} while (--n);
|
||||||
|
|
Loading…
Reference in a new issue