Skip to content

Commit 7e9fb8a

Browse files
committed
renamed to tiny_unhook_ex
1 parent e64ae54 commit 7e9fb8a

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ create a backup of original function head after hooking
1818
then use `tiny_unhook` to remove the hook
1919
*/
2020
int tiny_hook_ex(th_bak_t *bak, void *function, void *destination, void **origin);
21-
int tiny_unhook(th_bak_t *bak);
21+
22+
int tiny_unhook_ex(th_bak_t *bak);
2223

2324
/*
2425
insert a function call (bl / call) at `address`, auto select far or near

include/tinyhook.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ int tiny_hook(void *function, void *destination, void **origin);
2727

2828
int tiny_hook_ex(th_bak_t *bak, void *function, void *destination, void **origin);
2929

30-
int tiny_unhook(th_bak_t *bak);
30+
int tiny_unhook_ex(th_bak_t *bak);
3131

3232
int tiny_insert(void *address, void *destination);
3333

src/exhook.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ int tiny_hook_ex(th_bak_t *bak, void *function, void *destination, void **origin
1717
return tiny_hook(function, destination, origin);
1818
}
1919

20-
int tiny_unhook(th_bak_t *bak) {
20+
int tiny_unhook_ex(th_bak_t *bak) {
2121
return write_mem(bak->address, bak->head_bak, bak->jump_size);
2222
}

test/hook/example.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ __attribute__((constructor(0))) int load() {
4747
printf("Hello, world!\n");
4848
// remove hook
4949
fprintf(stderr, "=== Removing hook\n");
50-
tiny_unhook(&printf_bak);
50+
tiny_unhook_ex(&printf_bak);
5151
printf("Hook is removed!\n");
5252
return 0;
5353
}

0 commit comments

Comments
 (0)