Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Classes | |
struct | rz_platform_profile_t |
struct | rz_platform_target_t |
struct | rz_platform_item_t |
struct | rz_platform_target_index_t |
Typedefs | |
typedef struct rz_platform_profile_t | RzPlatformProfile |
typedef struct rz_platform_target_t | RzPlatformTarget |
typedef struct rz_platform_item_t | RzPlatformItem |
typedef struct rz_platform_target_index_t | RzPlatformTargetIndex |
typedef struct rz_platform_item_t RzPlatformItem |
typedef struct rz_platform_profile_t RzPlatformProfile |
typedef struct rz_platform_target_t RzPlatformTarget |
typedef struct rz_platform_target_index_t RzPlatformTargetIndex |
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 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_add_flag_every_io | ( | RzPlatformProfile * | profile, |
RzFlag * | flags | ||
) |
Adds the IO and extended IO registers from the CPU profiles as flags.
profile | reference to RzPlatformProfile |
flags | reference to RzFlag |
Definition at line 5236 of file canalysis.c.
References add_mmio_extended_flag_cb(), add_mmio_flag_cb(), flags, rz_platform_profile_t::registers_extended, rz_platform_profile_t::registers_mmio, rz_flag_unset_all_in_space(), RZ_FLAGS_FS_MMIO_REGISTERS, and RZ_FLAGS_FS_MMIO_REGISTERS_EXTENDED.
Referenced by rz_core_analysis_all().
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 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().
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().