Go: update test hooks

This commit is contained in:
Ryan Hileman
2016-02-27 10:55:40 -08:00
parent 693719e732
commit 475c8de3de
2 changed files with 5 additions and 5 deletions

View File

@@ -100,9 +100,9 @@ func (u *uc) HookAdd(htype int, cb interface{}, begin, end uint64, extra ...int)
data := &HookData{u, cb}
uptr := uintptr(unsafe.Pointer(data))
if insnMode {
C.uc_hook_add_wrap(u.handle, &h2, C.uc_hook_type(htype), callback, C.uintptr_t(uptr), C.uint64_t(begin), C.uint64_t(end))
} else {
C.uc_hook_add_insn(u.handle, &h2, C.uc_hook_type(htype), callback, C.uintptr_t(uptr), C.uint64_t(begin), C.uint64_t(end), insn)
} else {
C.uc_hook_add_wrap(u.handle, &h2, C.uc_hook_type(htype), callback, C.uintptr_t(uptr), C.uint64_t(begin), C.uint64_t(end))
}
hookDataMap[uptr] = data
hookToUintptr[Hook(h2)] = uptr