Skip to content

Commit

Permalink
Remove redundant hook declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
dargueta committed Nov 21, 2024
1 parent d098609 commit d5ba7e8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
1 change: 1 addition & 0 deletions csrc/unicorn.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* @module unicorn_c_
*/

#include "unicornlua/basic_hook_functions.h"
#include "unicornlua/control_functions.h"
#include "unicornlua/engine.h"
#include "unicornlua/hooks.h"
Expand Down
4 changes: 2 additions & 2 deletions csrc/unicornlua/basic_hook_functions.template
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@


! for hook_name, hook_definition in pairs(basic_hook_functions) do
UNICORN_EXPORT
void ulinternal_hook_callback__$(hook_name)(
UNICORN_EXPORT void ulinternal_hook_callback__$(hook_name)(
uc_engine *engine,
! for _, argument_definition in ipairs(hook_definition.arguments) do
$(argument_definition.type) $(argument_definition.name),
! end
void *userdata
);
int ul_create_$(hook_name)_hook(lua_State *L);
! end
5 changes: 0 additions & 5 deletions csrc/unicornlua/hooks.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,10 @@ typedef struct
void ulinternal_push_callback_to_lua(const ULHookState *hook);

int ul_hook_del(lua_State *L);
int ul_create_interrupt_hook(lua_State *L);
int ul_create_memory_access_hook(lua_State *L);
int ul_create_invalid_mem_access_hook(lua_State *L);
int ul_create_port_in_hook(lua_State *L);
int ul_create_port_out_hook(lua_State *L);
int ul_create_arm64_sys_hook(lua_State *L);
int ul_create_cpuid_hook(lua_State *L);
int ul_create_generic_no_arguments_hook(lua_State *L);
int ul_create_code_hook(lua_State *L);
int ul_create_edge_generated_hook(lua_State *L);
int ul_create_tcg_opcode_hook(lua_State *L);
int ul_release_hook_callbacks(lua_State *L);
Expand Down

0 comments on commit d5ba7e8

Please sign in to comment.