regress: fix all the calls to uc_hook_add() following recent change on this API

This commit is contained in:
Nguyen Anh Quynh 2016-04-03 23:32:14 +08:00
parent bb1236a850
commit 1486ccce70
3 changed files with 4 additions and 4 deletions

View File

@ -78,7 +78,7 @@ loop:
}
uc_hook_add(uc, &trace, UC_HOOK_MEM_WRITE | UC_HOOK_MEM_READ, (void *)hook_mem_rw, NULL);
uc_hook_add(uc, &trace, UC_HOOK_MEM_WRITE | UC_HOOK_MEM_READ, (void *)hook_mem_rw, NULL, 1, 0);
uc_reg_write(uc, UC_X86_REG_EAX, &EAX);
uc_reg_write(uc, UC_X86_REG_ESP, &ESP);

View File

@ -38,7 +38,7 @@ int main()
uc_mem_write(uc, UC_BUG_WRITE_ADDR,
(const uint8_t*)"\xff\xff\xff\xff\xff\xff\xff\xff", 8);
}
uc_hook_add(uc, &uh_trap, UC_HOOK_INTR, _interrupt, NULL);
uc_hook_add(uc, &uh_trap, UC_HOOK_INTR, _interrupt, NULL, 1, 0);
uc_emu_start(uc, UC_BUG_WRITE_ADDR, UC_BUG_WRITE_ADDR+8, 0, 1);
uc_close(uc);
printf ("Correct: %s\n", got_sigill? "YES": "NO");

View File

@ -36,7 +36,7 @@ int main(int argc, char **argv, char **envp)
}
// Hook the SYSENTER instructions
if (uc_hook_add (uc, &sysenterHook, UC_HOOK_INSN, sysenter, NULL, UC_X86_INS_SYSENTER) != UC_ERR_OK) {
if (uc_hook_add (uc, &sysenterHook, UC_HOOK_INSN, sysenter, NULL, UC_X86_INS_SYSENTER, 1, 0) != UC_ERR_OK) {
printf ("Cannot hook SYSENTER instruction\n.");
return -1;
}