mirror of
https://github.com/Vita3K/unicorn.git
synced 2024-11-23 13:29:40 +00:00
regress: fix all the calls to uc_hook_add() following recent change on this API
This commit is contained in:
parent
bb1236a850
commit
1486ccce70
@ -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);
|
||||
|
@ -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");
|
||||
|
@ -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;
|
||||
}
|
||||
@ -57,4 +57,4 @@ int main(int argc, char **argv, char **envp)
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user