9 static int __lib_##x##_cb(RzLibPlugin *pl, void *user, void *data) { \
10 struct rz_##x##_plugin_t *hand = (struct rz_##x##_plugin_t *)data; \
11 RzCore *core = (RzCore *)user; \
13 rz_##x##_add(core->y, hand); \
16 static int __lib_##x##_dt(RzLibPlugin *pl, void *p, void *u) { \
42 #define rz_io_add rz_io_plugin_add
44 #define rz_debug_add rz_debug_plugin_add
46 #define rz_bp_add rz_bp_plugin_add
49 CB(analysis, analysis)
52 #define rz_bin_add rz_bin_plugin_add
55 #define rz_hash_add rz_hash_plugin_add
60 const char *dir_plugins =
rz_config_get(core->config,
"dir.plugins");
61 if (where & RZ_CORE_LOADLIBS_CONFIG) {
64 if (where & RZ_CORE_LOADLIBS_ENV) {
71 if (where & RZ_CORE_LOADLIBS_HOME) {
81 if (where & RZ_CORE_LOADLIBS_SYSTEM) {
91 #define DF(x, y, z) rz_lib_add_handler(core->lib, RZ_LIB_TYPE_##x, y, &__lib_##z##_cb, &__lib_##z##_dt, core);
93 DF(DEMANGLER,
"demangler plugins", demangler);
94 DF(IO,
"io plugins", io);
95 DF(
CORE,
"core plugins", core);
96 DF(DBG,
"debugger plugins",
debug);
97 DF(BP,
"debugger breakpoint plugins", bp);
98 DF(LANG,
"language plugins", lang);
99 DF(ANALYSIS,
"analysis plugins", analysis);
100 DF(ASM,
"(dis)assembler plugins",
asm);
101 DF(PARSE,
"parsing plugins",
parse);
102 DF(BIN,
"bin plugins",
bin);
103 DF(EGG,
"egg plugins", egg);
104 DF(HASH,
"hash plugins", hash);
112 if (!strcmp(
ext,
"py") || !strcmp(
ext,
"js") || !strcmp(
ext,
"lua")) {
136 eprintf(
"Cannot find script '%s'\n", script_file);
RZ_API bool rz_core_run_script(RzCore *core, RZ_NONNULL const char *file)
RZ_API ut64 rz_config_get_i(RzConfig *cfg, RZ_NONNULL const char *name)
RZ_API RZ_BORROW const char * rz_config_get(RzConfig *cfg, RZ_NONNULL const char *name)
RZ_API bool rz_core_plugin_add(RzCore *core, RzCorePlugin *plugin)
checking print the parsed form of the magic use in n conjunction with m to debug a new magic file n before installing it n output MIME type special files
RZ_API void Ht_() free(HtName_(Ht) *ht)
RZ_API bool rz_demangler_plugin_add(RZ_NONNULL RzDemangler *dem, RZ_NONNULL RzDemanglerPlugin *plugin)
Adds a new demangler plugin to the plugin list.
RZ_API void rz_list_free(RZ_NONNULL RzList *list)
Empties the list and frees the list pointer.
static int __lib_demangler_cb(RzLibPlugin *pl, void *user, void *data)
static int __lib_core_cb(RzLibPlugin *pl, void *user, void *data)
RZ_API void rz_core_loadlibs_init(RzCore *core)
static int __lib_core_dt(RzLibPlugin *pl, void *p, void *u)
static int __lib_demangler_dt(RzLibPlugin *pl, void *p, void *u)
static void loadSystemPlugins(RzCore *core, int where)
static bool __isScriptFilename(const char *name)
RZ_API int rz_core_loadlibs(RzCore *core, int where)
RZ_API RzLib * rz_lib_new(const char *symname, const char *symnamefunc)
RZ_API bool rz_lib_opendir(RzLib *lib, const char *path, bool force)
Open all the libraries in the given directory, if it wasn't already opened.
RZ_API RZ_OWN char * rz_path_home_prefix(RZ_NULLABLE const char *path)
Return path prefixed by the home prefix.
RZ_API RZ_OWN char * rz_path_system(RZ_NULLABLE const char *path)
Return the full system path of the given subpath path.
RZ_API const char * rz_str_lchr(const char *str, char chr)
RZ_API char * rz_str_newf(const char *fmt,...) RZ_PRINTF_CHECK(1
RZ_API char * rz_sys_getenv(const char *key)
Get the value of an environment variable named key or NULL if none exists.
RZ_API RzList * rz_sys_dir(const char *path)
RZ_API ut64 rz_time_now_mono(void)
Returns the current time in microseconds, using the monotonic clock.
#define RZ_HOME_OLD_PLUGINS
ut64(WINAPI *w32_GetEnabledXStateFeatures)()