rename uchook to uc_hook, ucengine to uc_engine, uc_hook_t to uc_hook_type
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
#include <unicorn/unicorn.h>
|
||||
#include "_cgo_export.h"
|
||||
|
||||
uc_err uc_hook_add_i1(uch handle, uch *h2, uc_hook_t type, void *callback, void *user, int arg1) {
|
||||
uc_err uc_hook_add_i1(uch handle, uch *h2, uc_hook_type type, void *callback, void *user, int arg1) {
|
||||
return uc_hook_add(handle, h2, type, callback, user, arg1);
|
||||
}
|
||||
|
||||
uc_err uc_hook_add_u2(uch handle, uch *h2, uc_hook_t type, void *callback, void *user, uint64_t arg1, uint64_t arg2) {
|
||||
uc_err uc_hook_add_u2(uch handle, uch *h2, uc_hook_type type, void *callback, void *user, uint64_t arg1, uint64_t arg2) {
|
||||
return uc_hook_add(handle, h2, type, callback, user, arg1, arg2);
|
||||
}
|
||||
|
||||
|
||||
@@ -101,9 +101,9 @@ func (u *Uc) HookAdd(htype int, cb interface{}, extra ...uint64) (C.uch, error)
|
||||
} else {
|
||||
uarg1, uarg2 = 1, 0
|
||||
}
|
||||
C.uc_hook_add_u2(u.Handle, &h2, C.uc_hook_t(htype), callback, unsafe.Pointer(data), uarg1, uarg2)
|
||||
C.uc_hook_add_u2(u.Handle, &h2, C.uc_hook_type(htype), callback, unsafe.Pointer(data), uarg1, uarg2)
|
||||
} else {
|
||||
C.uc_hook_add_i1(u.Handle, &h2, C.uc_hook_t(htype), callback, unsafe.Pointer(data), iarg1)
|
||||
C.uc_hook_add_i1(u.Handle, &h2, C.uc_hook_type(htype), callback, unsafe.Pointer(data), iarg1)
|
||||
}
|
||||
hookRetain[h2] = data
|
||||
return h2, nil
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
uc_err uc_hook_add_i1(uch handle, uch *h2, uc_hook_t type, void *callback, void *user_data, int arg1);
|
||||
uc_err uc_hook_add_u2(uch handle, uch *h2, uc_hook_t type, void *callback, void *user_data, uint64_t arg1, uint64_t arg2);
|
||||
uc_err uc_hook_add_i1(uch handle, uch *h2, uc_hook_type type, void *callback, void *user_data, int arg1);
|
||||
uc_err uc_hook_add_u2(uch handle, uch *h2, uc_hook_type type, void *callback, void *user_data, uint64_t arg1, uint64_t arg2);
|
||||
void hookCode_cgo(uch handle, uint64_t addr, uint32_t size, void *user);
|
||||
bool hookMemInvalid_cgo(uch handle, uc_mem_type type, uint64_t addr, int size, int64_t value, void *user);
|
||||
void hookMemAccess_cgo(uch handle, uc_mem_type type, uint64_t addr, int size, int64_t value, void *user);
|
||||
|
||||
Reference in New Issue
Block a user