Sync PC after we exit
We should sync PC if there is no UC_HOOK_CODE hook
This commit is contained in:
@@ -72,7 +72,7 @@ static inline tcg_target_ulong cpu_tb_exec(CPUState *cpu, TranslationBlock *itb)
|
|||||||
* of the start of the TB.
|
* of the start of the TB.
|
||||||
*/
|
*/
|
||||||
CPUClass *cc = CPU_GET_CLASS(cpu);
|
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.
|
// We should sync pc for R/W error.
|
||||||
switch (env->uc->invalid_error) {
|
switch (env->uc->invalid_error) {
|
||||||
case UC_ERR_WRITE_PROT:
|
case UC_ERR_WRITE_PROT:
|
||||||
@@ -87,9 +87,6 @@ static inline tcg_target_ulong cpu_tb_exec(CPUState *cpu, TranslationBlock *itb)
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (cc->synchronize_from_tb) {
|
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);
|
cc->synchronize_from_tb(cpu, last_tb);
|
||||||
} else {
|
} else {
|
||||||
assert(cc->set_pc);
|
assert(cc->set_pc);
|
||||||
|
|||||||
Reference in New Issue
Block a user