arm: fix change PC feature. now tests/regress/callback-pc.py passes

This commit is contained in:
Nguyen Anh Quynh
2016-01-28 16:03:19 +08:00
parent 5a04bcb115
commit c8569d8128
2 changed files with 6 additions and 2 deletions

View File

@ -90,10 +90,12 @@ int arm_reg_write(struct uc_struct *uc, unsigned int regid, const void *value)
break;
//case UC_ARM_REG_PC:
case UC_ARM_REG_R15:
ARM_CPU(uc, mycpu)->env.pc = *(uint32_t *)value;
ARM_CPU(uc, mycpu)->env.regs[15] = *(uint32_t *)value;
// force to quit execution and flush TB
uc->quit_request = true;
uc_emu_stop(uc);
break;
}
}