Sync PC after we exit
We should sync PC if there is no UC_HOOK_CODE hook
This commit is contained in:
parent
ce932e4c28
commit
b7bc13650c
@ -72,7 +72,7 @@ static inline tcg_target_ulong cpu_tb_exec(CPUState *cpu, TranslationBlock *itb)
|
||||
* of the start of the TB.
|
||||
*/
|
||||
CPUClass *cc = CPU_GET_CLASS(cpu);
|
||||
if (!HOOK_EXISTS(env->uc, UC_HOOK_CODE) && !env->uc->timeout) {
|
||||
if (!HOOK_EXISTS(env->uc, UC_HOOK_CODE)) {
|
||||
// We should sync pc for R/W error.
|
||||
switch (env->uc->invalid_error) {
|
||||
case UC_ERR_WRITE_PROT:
|
||||
@ -87,9 +87,6 @@ static inline tcg_target_ulong cpu_tb_exec(CPUState *cpu, TranslationBlock *itb)
|
||||
break;
|
||||
default:
|
||||
if (cc->synchronize_from_tb) {
|
||||
// avoid sync twice when helper_uc_tracecode() already did this.
|
||||
if (env->uc->emu_counter <= env->uc->emu_count &&
|
||||
!env->uc->stop_request && !env->uc->quit_request)
|
||||
cc->synchronize_from_tb(cpu, last_tb);
|
||||
} else {
|
||||
assert(cc->set_pc);
|
||||
|
Loading…
Reference in New Issue
Block a user