Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Classes | |
struct | rz_lib_plugin_t |
struct | rz_lib_handler_t |
struct | rz_lib_struct_t |
struct | rz_lib_t |
Macros | |
#define | RZ_LIB_SEPARATOR "." |
#define | RZ_LIB_SYMNAME "rizin_plugin" |
#define | RZ_LIB_SYMFUNC "rizin_plugin_function" |
#define | RZ_LIB_ENV "RZ_LIBR_PLUGINS" |
#define | RZ_LIB_EXT "so" |
Typedefs | |
typedef struct rz_lib_plugin_t | RzLibPlugin |
typedef struct rz_lib_handler_t | RzLibHandler |
typedef struct rz_lib_struct_t | RzLibStruct |
typedef RzLibStruct *(* | RzLibStructFunc) (void) |
typedef struct rz_lib_t | RzLib |
typedef int(* | RzLibCallback) (RzLibPlugin *, void *, void *) |
typedef int(* RzLibCallback) (RzLibPlugin *, void *, void *) |
typedef struct rz_lib_handler_t RzLibHandler |
typedef struct rz_lib_plugin_t RzLibPlugin |
typedef struct rz_lib_struct_t RzLibStruct |
typedef RzLibStruct*(* RzLibStructFunc) (void) |
enum RzLibType |
Definition at line 68 of file rz_lib.h.
RZ_API bool rz_lib_add_handler | ( | RzLib * | lib, |
int | type, | ||
const char * | desc, | ||
RzLibCallback | ct, | ||
RzLibCallback | dt, | ||
void * | user | ||
) |
Referenced by __load_plugins(), hash_load_plugins(), and rz_main_rz_bin().
Definition at line 227 of file lib.c.
References free(), NULL, p, rz_lib_t::plugins, rz_list_delete(), and RZ_LOG_INFO.
Referenced by rz_lib_free(), and rz_plugins_unload_handler().
Definition at line 528 of file lib.c.
References h, rz_lib_t::handlers, rz_list_delete(), and type.
Definition at line 104 of file lib.c.
Referenced by _free_source_cb(), lang_lib_file_run(), rz_analysis_esil_load_source(), rz_analysis_esil_release_source(), rz_lib_open(), rz_lib_open_ptr(), rz_main_rz_bin(), and rz_run_start().
Definition at line 54 of file lib.c.
References calloc(), free(), NULL, and RZ_LOG_ERROR.
Referenced by lang_lib_file_run(), rz_analysis_esil_load_source(), rz_lib_open(), rz_main_rz_bin(), rz_run_start(), and rzpipe_open_dl().
Definition at line 90 of file lib.c.
References NULL.
Referenced by lang_lib_file_run(), rz_analysis_esil_load_interrupts_from_lib(), rz_debug_continue_kill(), rz_lib_open(), rz_run_start(), rz_sys_get_environ(), and rzpipe_open_dl().
Definition at line 189 of file lib.c.
References free(), rz_lib_t::handlers, NULL, rz_lib_t::opened_dirs, rz_lib_t::plugins, rz_lib_close(), rz_list_free(), rz_lib_t::symname, and rz_lib_t::symnamefunc.
Referenced by __as_free(), hash_load_plugins(), rz_core_fini(), and rz_main_rz_bin().
RZ_API RzLibHandler* rz_lib_get_handler | ( | RzLib * | lib, |
int | type | ||
) |
Definition at line 216 of file lib.c.
References h, rz_lib_t::handlers, NULL, and type.
Referenced by rz_lib_open_ptr().
Definition at line 543 of file lib.c.
References __lib_types_get(), p, rz_lib_t::plugins, and printf().
Definition at line 176 of file lib.c.
References free(), rz_lib_t::handlers, NULL, rz_lib_t::opened_dirs, rz_lib_t::plugins, RZ_LIB_SYMFUNC, RZ_LIB_SYMNAME, rz_list_newf(), RZ_NEW, strdup(), rz_lib_t::symname, and rz_lib_t::symnamefunc.
Referenced by __as_new(), hash_load_plugins(), rz_core_loadlibs_init(), and rz_main_rz_bin().
Definition at line 281 of file lib.c.
References __already_loaded(), __lib_dl_check_filename(), basename, free(), NULL, rz_file_basename(), RZ_HOME_OLD_PLUGINS, rz_lib_dl_close(), rz_lib_dl_open(), rz_lib_dl_sym(), rz_lib_open_ptr(), RZ_LOG_ERROR, RZ_LOG_INFO, RZ_LOG_WARN, rz_path_home_prefix(), RZ_PLUGINS, rz_lib_t::symname, and rz_lib_t::symnamefunc.
Referenced by rz_lib_opendir(), rz_main_rizin(), rz_plugins_io_print_handler(), and rz_plugins_load_handler().
RZ_API int rz_lib_open_ptr | ( | RzLib * | lib, |
const char * | file, | ||
void * | handler, | ||
RzLibStruct * | stru | ||
) |
Definition at line 343 of file lib.c.
References rz_lib_struct_t::data, free(), rz_lib_struct_t::free, major, major_minor(), minor, mm1, p, rz_lib_struct_t::pkgname, rz_lib_t::plugins, printf(), rz_lib_dl_close(), rz_lib_get_handler(), rz_lib_run_handler(), rz_list_append(), RZ_LOG_DEBUG, RZ_LOG_ERROR, RZ_LOG_INFO, RZ_LOG_WARN, RZ_NEW0, rz_return_val_if_fail, RZ_VERSION, strdup(), rz_lib_struct_t::type, and rz_lib_struct_t::version.
Referenced by rz_lib_open().
Open all the libraries in the given directory, if it wasn't already opened.
Opens all the files ending with the right library extension (e.g. ".so") present in the directory pointed by path
. If path
was already opened, it is not opened again unless force
is set to true.
lib | Reference to RzLib |
path | Directory to open |
force | When true, a directory is re-scanned even if it was already opened |
Definition at line 417 of file lib.c.
References __lib_dl_check_filename(), dirent::d_name, regress::directory, fh, free(), HANDLE, INVALID_HANDLE_VALUE, L, NULL, rz_lib_t::opened_dirs, path, readdir, rz_lib_open(), RZ_LOG_INFO, rz_return_val_if_fail, and snprintf.
Referenced by __load_plugins(), hash_load_plugins(), loadSystemPlugins(), and rz_main_rz_bin().
Definition at line 112 of file lib.c.
References count, env, err, free(), malloc(), NULL, path, rz_file_exists(), RZ_FREE, RZ_LIB_EXT, rz_str_append(), rz_str_newf(), rz_sys_getenv(), rz_sys_perror, strdup(), and autogen_x86imm::tmp.
RZ_API int rz_lib_run_handler | ( | RzLib * | lib, |
RzLibPlugin * | plugin, | ||
RzLibStruct * | symbol | ||
) |
Definition at line 206 of file lib.c.
References rz_lib_struct_t::data, h, rz_lib_plugin_t::handler, RZ_LOG_DEBUG, and RZ_LOG_WARN.
Referenced by rz_lib_open_ptr().
Definition at line 45 of file lib.c.
References i, rz_lib_type_name_t::id, RZ_ARRAY_SIZE, RZ_LIB_TYPE_UNKNOWN, rz_lib_types, and cmd_descs_generate::str.
RZ_LIB_VERSION_HEADER | ( | rz_lib | ) |