mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-03 17:35:27 +00:00
regress: fix testcase hook_code_add_del.py
This commit is contained in:
parent
b29ce1c4fd
commit
2984901f62
|
@ -38,8 +38,8 @@ class HookCodeAddDelTest(regress.RegressTest):
|
||||||
emu.reg_write(UC_X86_REG_ESP, STACK_ADDRESS + STACK_SIZE)
|
emu.reg_write(UC_X86_REG_ESP, STACK_ADDRESS + STACK_SIZE)
|
||||||
|
|
||||||
# UC_HOOK_CODE hook will work even after deletion
|
# UC_HOOK_CODE hook will work even after deletion
|
||||||
emu.hook_add(UC_HOOK_CODE, hook_code, None)
|
i = emu.hook_add(UC_HOOK_CODE, hook_code, None)
|
||||||
emu.hook_del(UC_HOOK_CODE)
|
emu.hook_del(i)
|
||||||
|
|
||||||
emu.emu_start(EP, EP + len(CODE), count = 3)
|
emu.emu_start(EP, EP + len(CODE), count = 3)
|
||||||
print("EIP: 0x%x" % emu.reg_read(UC_X86_REG_EIP))
|
print("EIP: 0x%x" % emu.reg_read(UC_X86_REG_EIP))
|
||||||
|
|
Loading…
Reference in a new issue