regress: adapt all C code to latest change in uc_hook_add() API

This commit is contained in:
Nguyen Anh Quynh
2016-03-26 00:32:32 +08:00
parent 3bb05fa8e9
commit 90cefeb167
17 changed files with 30 additions and 30 deletions

View File

@@ -83,10 +83,10 @@ int main(int argc, char **argv, char **envp)
uc_mem_write(uc, 0x300000, (const uint8_t*)"\x41\x41\x41\x41", 4);
uc_mem_write(uc, 0x400000, (const uint8_t*)"\x42\x42\x42\x42", 4);
//uc_hook_add(uc, &trace2, UC_HOOK_CODE, hook_code, NULL, (uint64_t)0x400000, (uint64_t)0x400fff);
//uc_hook_add(uc, &trace2, UC_HOOK_CODE, hook_code, NULL, 0x400000, 0x400fff);
// intercept invalid memory events
uc_hook_add(uc, &trace1, UC_MEM_READ_PROT, hook_mem_invalid, NULL);
uc_hook_add(uc, &trace1, UC_MEM_READ_PROT, hook_mem_invalid, NULL, 1, 0);
// emulate machine code in infinite time
printf("BEGIN execution\n");