From 83887b8193dfeca3e5e8da851b41f874bcd0514e Mon Sep 17 00:00:00 2001 From: w1tcher Date: Fri, 25 Oct 2019 14:47:29 +0800 Subject: [PATCH] Fix the error in the hook_code of the arm, calling emu_stop and causing the pc value to be incorrect after the end of the run. (#1157) --- qemu/cpu-exec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qemu/cpu-exec.c b/qemu/cpu-exec.c index 4b164fc1..c9198aa0 100644 --- a/qemu/cpu-exec.c +++ b/qemu/cpu-exec.c @@ -327,7 +327,8 @@ static tcg_target_ulong cpu_tb_exec(CPUState *cpu, uint8_t *tb_ptr) } else { assert(cc->set_pc); // avoid sync twice when helper_uc_tracecode() already did this. - if (env->uc->emu_counter <= env->uc->emu_count && !env->uc->quit_request) + if (env->uc->emu_counter <= env->uc->emu_count && + !env->uc->stop_request && !env->uc->quit_request) cc->set_pc(cpu, tb->pc); } }