Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
RZ_API void rz_platform_item_free | ( | RzPlatformItem * | item | ) |
Frees an RzPlatformItem type.
Definition at line 51 of file platform_target_index.c.
References rz_platform_item_t::comment, free(), and rz_platform_item_t::name.
Referenced by sdb_load_platform_profile().
RZ_API RZ_OWN RzPlatformItem* rz_platform_item_new | ( | RZ_NULLABLE const char * | name | ) |
Creates a new RzPlatformItem type.
Definition at line 10 of file platform_target_index.c.
References rz_platform_item_t::comment, rz_platform_item_t::name, NULL, RZ_NEW0, and strdup().
Referenced by sdb_load_platform_profile().
RZ_API void rz_platform_target_index_free | ( | RzPlatformTargetIndex * | target | ) |
Frees an RzPlatformTargetIndex type.
Definition at line 39 of file platform_target_index.c.
References free(), rz_platform_target_index_t::path, and rz_platform_target_index_t::platforms.
Referenced by rz_analysis_free().
RZ_API bool rz_platform_target_index_init | ( | RzPlatformTargetIndex * | t, |
RZ_NONNULL const char * | arch, | ||
RZ_NONNULL const char * | cpu, | ||
const char * | platform, | ||
RZ_NONNULL const char * | platforms_dir | ||
) |
Initialize Platform Profiles by setting the path to the corresponding SDB file.
t | reference to RzPlatformTargetIndex |
arch | reference to the selected architecture (value of asm.arch |
platform | reference to the selected platform (value of asm.platform ) |
platforms_dir | reference to the directory containing platform files |
Definition at line 134 of file platform_target_index.c.
References arch, cpu, free(), rz_platform_target_index_t::path, path, rz_file_path_join(), rz_platform_target_index_load_sdb(), rz_return_val_if_fail, RZ_STR_ISEMPTY, and rz_strf.
Referenced by cb_asmarch(), cb_asmcpu(), and cb_asmplatform().
RZ_API bool rz_platform_target_index_load_sdb | ( | RZ_NONNULL RzPlatformTargetIndex * | t, |
RZ_NONNULL const char * | path | ||
) |
Loads the contents of the Platform Profile to the RzPlatformTargetIndex.
t | reference to RzPlatformTargetIndex |
path | reference to path of the SDB file |
Definition at line 115 of file platform_target_index.c.
References path, rz_file_exists(), rz_return_val_if_fail, and sdb_load_arch_platform_by_path().
Referenced by rz_platform_target_index_init().
RZ_API RZ_OWN RzPlatformTargetIndex* rz_platform_target_index_new | ( | ) |
Creates a new RzPlatformTargetIndex type.
Definition at line 23 of file platform_target_index.c.
References free(), NULL, rz_platform_target_index_t::platforms, and RZ_NEW0.
Referenced by rz_analysis_new().
|
static |
Definition at line 94 of file platform_target_index.c.
References path, rz_return_val_if_fail, sdb_close(), sdb_free(), sdb_load_platform_profile(), and sdb_new().
Referenced by rz_platform_target_index_load_sdb().
|
static |
Definition at line 60 of file platform_target_index.c.
References rz_platform_item_t::comment, ls_foreach, name, rz_platform_item_t::name, NULL, rz_platform_item_free(), rz_platform_item_new(), rz_return_val_if_fail, rz_str_newf(), sdb_foreach_list(), sdb_get(), sdb_num_get(), sdbkv_key(), sdbkv_value(), and ut64().
Referenced by sdb_load_arch_platform_by_path().