Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
|
inlinestatic |
|
static |
Definition at line 22 of file platform_profile.c.
References free().
Referenced by rz_platform_profile_new().
Definition at line 175 of file platform_profile.c.
References cpu, files, free(), NULL, rz_list_free(), rz_str_ndup(), and rz_sys_dir().
Referenced by rz_platform_profiles_init().
RZ_API bool rz_platform_load_profile_sdb | ( | RzPlatformTarget * | t, |
const char * | path | ||
) |
Loads the contents of the CPU Profile to the RzPlatformProfile.
t | reference to RzPlatformTarget |
path | reference to path of the SDB file |
Definition at line 168 of file platform_profile.c.
References path, rz_file_exists(), and sdb_load_arch_profile_by_path().
Referenced by rz_platform_profiles_init().
RZ_API void rz_platform_profile_free | ( | RzPlatformProfile * | p | ) |
Frees an RzPlatformProfile type.
Frees the hashtables used for MMIO and extended registers
Definition at line 13 of file platform_profile.c.
Referenced by rz_platform_target_free(), and sdb_load_arch_profile().
RZ_API RZ_OWN RzPlatformProfile* rz_platform_profile_new | ( | ) |
Creates a new RzPlatformProfile type.
Definition at line 29 of file platform_profile.c.
References free(), free_mmio_kv(), NULL, rz_platform_profile_t::registers_extended, rz_platform_profile_t::registers_mmio, RZ_NEW0, and strdup().
Referenced by rz_platform_target_new(), and sdb_load_arch_profile().
RZ_API RZ_BORROW const char* rz_platform_profile_resolve_extended_register | ( | RZ_NONNULL RzPlatformProfile * | profile, |
ut64 | address | ||
) |
Resolves an address and returns the linked extended register.
Definition at line 91 of file platform_profile.c.
References NULL, rz_return_val_if_fail, and ut64().
Referenced by ds_build_op_str().
RZ_API RZ_BORROW const char* rz_platform_profile_resolve_mmio | ( | RZ_NONNULL RzPlatformProfile * | profile, |
ut64 | address | ||
) |
Resolves an address and returns the linked mmio.
Definition at line 82 of file platform_profile.c.
References NULL, rz_return_val_if_fail, and ut64().
Referenced by ds_build_op_str(), and resolve_mmio().
RZ_API bool rz_platform_profiles_init | ( | RzPlatformTarget * | t, |
const char * | cpu, | ||
const char * | arch, | ||
const char * | cpus_dir | ||
) |
Initializes RzPlatformProfile by loading the path to the SDB file of the CPU profile.
t | reference to RzPlatformTarget |
cpu | reference to the selected CPU (value of asm.cpu ) |
arch | reference to the selected architecture (value of asm.arch ) |
cpus_dir | reference to the directory containing cpu files |
Definition at line 221 of file platform_profile.c.
References rz_platform_target_t::arch, arch, cpu, rz_platform_target_t::cpu, cpu_reload_needed(), free(), is_cpu_valid(), path, rz_file_path_join(), rz_platform_load_profile_sdb(), rz_strf, and strdup().
Referenced by cb_asmarch(), and cb_asmcpu().
RZ_API void rz_platform_target_free | ( | RzPlatformTarget * | t | ) |
Frees an RzPlatformTarget type.
Frees the pointer to the SDB and the RzPlatformProfile
Definition at line 69 of file platform_profile.c.
References rz_platform_target_t::arch, rz_platform_target_t::cpu, free(), rz_platform_target_t::profile, and rz_platform_profile_free().
Referenced by rz_analysis_free().
RZ_API RZ_OWN RzPlatformTarget* rz_platform_target_new | ( | ) |
Creates a new RzPlatformTarget type.
Definition at line 51 of file platform_profile.c.
References free(), NULL, rz_platform_target_t::profile, RZ_NEW0, and rz_platform_profile_new().
Referenced by rz_analysis_new().
|
static |
Definition at line 104 of file platform_profile.c.
References c, free(), ls_foreach, ls_free(), NULL, rz_platform_target_t::profile, rz_num_math(), rz_platform_profile_free(), rz_platform_profile_new(), rz_return_val_if_fail, rz_str_newf(), sdb_foreach_list(), sdb_num_get(), sdbkv_key(), sdbkv_value(), and ut64().
Referenced by sdb_load_arch_profile_by_path().
|
static |
Definition at line 154 of file platform_profile.c.
References path, sdb_close(), sdb_free(), sdb_load_arch_profile(), and sdb_new().
Referenced by rz_platform_load_profile_sdb().