regress: fix testcase hook_code_add_del.py

This commit is contained in:
Nguyen Anh Quynh 2015-12-23 01:45:29 +08:00
parent b29ce1c4fd
commit 2984901f62

View file

@ -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))