Rizin
unix-like reverse engineering framework and cli tools
|
#include <rz_analysis.h>
#include <rz_vector.h>
#include <rz_util/rz_graph_drawable.h>
#include <rz_util/rz_table.h>
#include "../include/rz_util/rz_graph.h"
Go to the source code of this file.
Classes | |
struct | DeleteClassCtx |
struct | RenameClassCtx |
Enumerations | |
enum | RzAnalysisClassAttrType { RZ_ANALYSIS_CLASS_ATTR_TYPE_METHOD , RZ_ANALYSIS_CLASS_ATTR_TYPE_VTABLE , RZ_ANALYSIS_CLASS_ATTR_TYPE_BASE } |
Functions | |
static void | rz_analysis_class_base_delete_class (RzAnalysis *analysis, const char *class_name) |
static void | rz_analysis_class_method_delete_class (RzAnalysis *analysis, const char *class_name) |
static void | rz_analysis_class_vtable_delete_class (RzAnalysis *analysis, const char *class_name) |
static void | rz_analysis_class_base_rename_class (RzAnalysis *analysis, const char *class_name_old, const char *class_name_new) |
static void | rz_analysis_class_method_rename_class (RzAnalysis *analysis, const char *old_class_name, const char *new_class_name) |
static void | rz_analysis_class_vtable_rename_class (RzAnalysis *analysis, const char *old_class_name, const char *new_class_name) |
static const char * | key_class (const char *name) |
static char * | key_attr_types (const char *name) |
static char * | key_attr_type_attrs (const char *class_name, const char *attr_type) |
static char * | key_attr_content (const char *class_name, const char *attr_type, const char *attr_id) |
static char * | key_attr_content_specific (const char *class_name, const char *attr_type, const char *attr_id) |
static const char * | attr_type_id (RzAnalysisClassAttrType attr_type) |
RZ_API void | rz_analysis_class_recover_from_rzbin (RzAnalysis *analysis) |
RZ_API RzAnalysisClassErr | rz_analysis_class_create (RzAnalysis *analysis, const char *name) |
RZ_API void | rz_analysis_class_delete (RzAnalysis *analysis, const char *name) |
static bool | rz_analysis_class_exists_raw (RzAnalysis *analysis, const char *name) |
RZ_API bool | rz_analysis_class_exists (RzAnalysis *analysis, const char *name) |
RZ_API SdbList * | rz_analysis_class_get_all (RzAnalysis *analysis, bool sorted) |
RZ_API void | rz_analysis_class_foreach (RzAnalysis *analysis, SdbForeachCallback cb, void *user) |
static bool | rename_key (Sdb *sdb, const char *key_old, const char *key_new) |
RZ_API RzAnalysisClassErr | rz_analysis_class_rename (RzAnalysis *analysis, const char *old_name, const char *new_name) |
static char * | rz_analysis_class_get_attr_raw (RzAnalysis *analysis, const char *class_name, RzAnalysisClassAttrType attr_type, const char *attr_id, bool specific) |
static char * | rz_analysis_class_get_attr (RzAnalysis *analysis, const char *class_name, RzAnalysisClassAttrType attr_type, const char *attr_id, bool specific) |
static RzAnalysisClassErr | rz_analysis_class_set_attr_raw (RzAnalysis *analysis, const char *class_name, RzAnalysisClassAttrType attr_type, const char *attr_id, const char *content) |
static RzAnalysisClassErr | rz_analysis_class_set_attr (RzAnalysis *analysis, const char *class_name, RzAnalysisClassAttrType attr_type, const char *attr_id, const char *content) |
static RzAnalysisClassErr | rz_analysis_class_delete_attr_raw (RzAnalysis *analysis, const char *class_name, RzAnalysisClassAttrType attr_type, const char *attr_id) |
static RzAnalysisClassErr | rz_analysis_class_delete_attr (RzAnalysis *analysis, const char *class_name, RzAnalysisClassAttrType attr_type, const char *attr_id) |
static RzAnalysisClassErr | rz_analysis_class_rename_attr_raw (RzAnalysis *analysis, const char *class_name, RzAnalysisClassAttrType attr_type, const char *attr_id_old, const char *attr_id_new) |
static RzAnalysisClassErr | rz_analysis_class_rename_attr (RzAnalysis *analysis, const char *class_name, RzAnalysisClassAttrType attr_type, const char *attr_id_old, const char *attr_id_new) |
static void | rz_analysis_class_unique_attr_id_raw (RzAnalysis *analysis, const char *class_name, RzAnalysisClassAttrType attr_type, char *out, size_t out_size) |
static char * | flagname_attr (const char *attr_type, const char *class_name, const char *attr_id) |
static void | rz_analysis_class_set_flag (RzAnalysis *analysis, const char *name, ut64 addr, ut32 size) |
static void | rz_analysis_class_unset_flag (RzAnalysis *analysis, const char *name) |
static void | rz_analysis_class_rename_flag (RzAnalysis *analysis, const char *old_name, const char *new_name) |
static RzAnalysisClassErr | rz_analysis_class_add_attr_unique_raw (RzAnalysis *analysis, const char *class_name, RzAnalysisClassAttrType attr_type, const char *content, char *attr_id_out, size_t attr_id_out_size) |
static RzAnalysisClassErr | rz_analysis_class_add_attr_unique (RzAnalysis *analysis, const char *class_name, RzAnalysisClassAttrType attr_type, const char *content, char *attr_id_out, size_t attr_id_out_size) |
static int | symbol_method_sort_by_addr (const void *x, const void *y) |
static char * | flagname_method (const char *class_name, const char *meth_name) |
RZ_API void | rz_analysis_class_method_fini (RzAnalysisMethod *meth) |
RZ_API void | rz_analysis_class_method_recover (RzAnalysis *analysis, RzBinClass *cls, RzList *methods) |
RZ_API bool | rz_analysis_class_method_exists (RzAnalysis *analysis, const char *class_name, const char *meth_name) |
RZ_API bool | rz_analysis_class_method_exists_by_addr (RzAnalysis *analysis, const char *class_name, ut64 addr) |
RZ_API RzAnalysisClassErr | rz_analysis_class_method_get_by_addr (RzAnalysis *analysis, const char *class_name, ut64 addr, RzAnalysisMethod *method) |
RZ_API RzAnalysisClassErr | rz_analysis_class_method_get (RzAnalysis *analysis, const char *class_name, const char *meth_name, RzAnalysisMethod *meth) |
static void | rz_analysis_class_method_fini_proxy (void *e, void *user) |
RZ_API RzVector * | rz_analysis_class_method_get_all (RzAnalysis *analysis, const char *class_name) |
RZ_API RzAnalysisClassErr | rz_analysis_class_method_set (RzAnalysis *analysis, const char *class_name, RzAnalysisMethod *meth) |
RZ_API RzAnalysisClassErr | rz_analysis_class_method_rename (RzAnalysis *analysis, const char *class_name, const char *old_meth_name, const char *new_meth_name) |
RZ_API RzAnalysisClassErr | rz_analysis_class_method_delete (RzAnalysis *analysis, const char *class_name, const char *meth_name) |
RZ_API void | rz_analysis_class_base_fini (RzAnalysisBaseClass *base) |
RZ_API RzAnalysisClassErr | rz_analysis_class_base_get (RzAnalysis *analysis, const char *class_name, const char *base_id, RzAnalysisBaseClass *base) |
static void | rz_analysis_class_base_fini_proxy (void *e, void *user) |
RZ_API RzVector * | rz_analysis_class_base_get_all (RzAnalysis *analysis, const char *class_name) |
static RzAnalysisClassErr | rz_analysis_class_base_set_raw (RzAnalysis *analysis, const char *class_name, RzAnalysisBaseClass *base, const char *base_class_name_sanitized) |
RZ_API RzAnalysisClassErr | rz_analysis_class_base_set (RzAnalysis *analysis, const char *class_name, RzAnalysisBaseClass *base) |
RZ_API RzAnalysisClassErr | rz_analysis_class_base_delete (RzAnalysis *analysis, const char *class_name, const char *base_id) |
static bool | rz_analysis_class_base_delete_class_cb (void *user, const char *k, const char *v) |
static bool | rz_analysis_class_base_rename_class_cb (void *user, const char *k, const char *v) |
static char * | flagname_vtable (const char *class_name, const char *vtable_id) |
RZ_API void | rz_analysis_class_vtable_fini (RzAnalysisVTable *vtable) |
RZ_API RzAnalysisClassErr | rz_analysis_class_vtable_get (RzAnalysis *analysis, const char *class_name, const char *vtable_id, RzAnalysisVTable *vtable) |
static void | rz_analysis_class_vtable_fini_proxy (void *e, void *user) |
RZ_API RzVector * | rz_analysis_class_vtable_get_all (RzAnalysis *analysis, const char *class_name) |
RZ_API RzAnalysisClassErr | rz_analysis_class_vtable_set (RzAnalysis *analysis, const char *class_name, RzAnalysisVTable *vtable) |
RZ_API RzAnalysisClassErr | rz_analysis_class_vtable_delete (RzAnalysis *analysis, const char *class_name, const char *vtable_id) |
RZ_API RzGraph * | rz_analysis_class_get_inheritance_graph (RzAnalysis *analysis) |
Creates RzGraph from class inheritance information where each node has RzGraphNodeInfo as generic data. More... | |
RZ_API void | rz_analysis_class_recover_all (RzAnalysis *analysis) |
|
static |
Definition at line 44 of file class.c.
References NULL, RZ_ANALYSIS_CLASS_ATTR_TYPE_BASE, RZ_ANALYSIS_CLASS_ATTR_TYPE_METHOD, and RZ_ANALYSIS_CLASS_ATTR_TYPE_VTABLE.
Referenced by rz_analysis_class_base_get_all(), rz_analysis_class_delete_attr_raw(), rz_analysis_class_get_attr_raw(), rz_analysis_class_method_delete_class(), rz_analysis_class_method_get_all(), rz_analysis_class_method_rename_class(), rz_analysis_class_rename_attr_raw(), rz_analysis_class_set_attr_raw(), rz_analysis_class_unique_attr_id_raw(), rz_analysis_class_vtable_delete_class(), rz_analysis_class_vtable_get_all(), and rz_analysis_class_vtable_rename_class().
|
static |
Definition at line 511 of file class.c.
References free(), NULL, r, rz_str_newf(), and rz_str_sanitize_sdb_key().
Referenced by flagname_method(), and flagname_vtable().
Definition at line 599 of file class.c.
References flagname_attr(), rz_str_new(), and rz_str_startswith().
Referenced by rz_analysis_class_method_delete(), rz_analysis_class_method_delete_class(), rz_analysis_class_method_rename(), rz_analysis_class_method_rename_class(), and rz_analysis_class_method_set().
Definition at line 1065 of file class.c.
References flagname_attr().
Referenced by rz_analysis_class_vtable_delete(), rz_analysis_class_vtable_delete_class(), rz_analysis_class_vtable_rename_class(), and rz_analysis_class_vtable_set().
|
static |
Definition at line 30 of file class.c.
References rz_str_newf().
Referenced by rz_analysis_class_delete(), rz_analysis_class_delete_attr_raw(), rz_analysis_class_get_attr_raw(), rz_analysis_class_rename(), rz_analysis_class_rename_attr_raw(), and rz_analysis_class_set_attr_raw().
|
static |
Definition at line 34 of file class.c.
References rz_str_newf().
Referenced by rz_analysis_class_delete(), rz_analysis_class_delete_attr_raw(), rz_analysis_class_get_attr_raw(), and rz_analysis_class_rename_attr_raw().
Definition at line 26 of file class.c.
References rz_str_newf().
Referenced by rz_analysis_class_base_get_all(), rz_analysis_class_delete(), rz_analysis_class_delete_attr_raw(), rz_analysis_class_method_delete_class(), rz_analysis_class_method_get_all(), rz_analysis_class_method_rename_class(), rz_analysis_class_rename(), rz_analysis_class_rename_attr_raw(), rz_analysis_class_set_attr_raw(), rz_analysis_class_unique_attr_id_raw(), rz_analysis_class_vtable_delete_class(), rz_analysis_class_vtable_get_all(), and rz_analysis_class_vtable_rename_class().
|
static |
Definition at line 22 of file class.c.
References rz_str_newf().
Referenced by rz_analysis_class_delete(), rz_analysis_class_delete_attr_raw(), rz_analysis_class_rename(), and rz_analysis_class_set_attr_raw().
Definition at line 18 of file class.c.
References name.
Referenced by rz_analysis_class_create(), rz_analysis_class_delete(), rz_analysis_class_exists_raw(), and rz_analysis_class_rename().
Definition at line 185 of file class.c.
References free(), sdb_get(), sdb_remove(), and sdb_set().
Referenced by rz_analysis_class_rename().
|
static |
Definition at line 572 of file class.c.
References err, free(), rz_analysis_class_add_attr_unique_raw(), and rz_str_sanitize_sdb_key().
Referenced by rz_analysis_class_base_set_raw(), and rz_analysis_class_vtable_set().
|
static |
Definition at line 556 of file class.c.
References err, rz_analysis_class_set_attr(), rz_analysis_class_unique_attr_id_raw(), and rz_str_ncpy().
Referenced by rz_analysis_class_add_attr_unique().
RZ_API RzAnalysisClassErr rz_analysis_class_base_delete | ( | RzAnalysis * | analysis, |
const char * | class_name, | ||
const char * | base_id | ||
) |
Definition at line 1010 of file class.c.
References RZ_ANALYSIS_CLASS_ATTR_TYPE_BASE, and rz_analysis_class_delete_attr().
Referenced by rz_analysis_class_base_del_handler(), and rz_analysis_class_base_delete_class_cb().
|
static |
Definition at line 1033 of file class.c.
References rz_analysis_class_base_delete_class_cb(), and rz_analysis_class_foreach().
Referenced by rz_analysis_class_delete().
|
static |
Definition at line 1019 of file class.c.
References k, rz_analysis_class_base_delete(), rz_analysis_class_base_get_all(), rz_vector_foreach, rz_vector_free(), and v.
Referenced by rz_analysis_class_base_delete_class().
RZ_API void rz_analysis_class_base_fini | ( | RzAnalysisBaseClass * | base | ) |
Definition at line 880 of file class.c.
References free().
Referenced by add_class_bases(), recovery_apply_bases(), rz_analysis_class_base_add_handler(), and rz_analysis_class_base_fini_proxy().
|
static |
Definition at line 922 of file class.c.
References e, and rz_analysis_class_base_fini().
Referenced by rz_analysis_class_base_get_all().
RZ_API RzAnalysisClassErr rz_analysis_class_base_get | ( | RzAnalysis * | analysis, |
const char * | class_name, | ||
const char * | base_id, | ||
RzAnalysisBaseClass * | base | ||
) |
Definition at line 885 of file class.c.
References free(), NULL, RZ_ANALYSIS_CLASS_ATTR_TYPE_BASE, rz_analysis_class_get_attr(), rz_num_math(), rz_str_sanitize_sdb_key(), sdb_anext(), and strdup().
Referenced by rz_analysis_class_base_get_all().
RZ_API RzVector* rz_analysis_class_base_get_all | ( | RzAnalysis * | analysis, |
const char * | class_name | ||
) |
Definition at line 928 of file class.c.
References attr_type_id(), free(), key, key_attr_type_attrs(), NULL, RZ_ANALYSIS_CLASS_ATTR_TYPE_BASE, rz_analysis_class_base_fini_proxy(), rz_analysis_class_base_get(), rz_str_sanitize_sdb_key(), rz_vector_free(), rz_vector_new(), rz_vector_push(), rz_vector_reserve(), sdb_aforeach, sdb_aforeach_next, sdb_alen(), rz_analysis_t::sdb_classes_attrs, and sdb_get().
Referenced by analysis_class_print(), analysis_class_print_as_cmd(), analysis_class_print_to_json(), rz_analysis_class_base_delete_class_cb(), rz_analysis_class_base_list_handler(), rz_analysis_class_base_rename_class_cb(), rz_analysis_class_base_set(), and rz_analysis_class_get_inheritance_graph().
|
static |
Definition at line 1058 of file class.c.
References rz_analysis_class_base_rename_class_cb(), and rz_analysis_class_foreach().
Referenced by rz_analysis_class_rename().
|
static |
Definition at line 1044 of file class.c.
References k, rz_analysis_class_base_get_all(), rz_analysis_class_base_set_raw(), rz_vector_foreach, rz_vector_free(), and v.
Referenced by rz_analysis_class_base_rename_class().
RZ_API RzAnalysisClassErr rz_analysis_class_base_set | ( | RzAnalysis * | analysis, |
const char * | class_name, | ||
RzAnalysisBaseClass * | base | ||
) |
Definition at line 983 of file class.c.
References err, free(), rz_analysis_class_base_get_all(), rz_analysis_class_base_set_raw(), rz_analysis_class_exists_raw(), rz_str_sanitize_sdb_key(), rz_vector_foreach, and rz_vector_free().
Referenced by add_class_bases(), recovery_apply_bases(), and rz_analysis_class_base_add_handler().
|
static |
Definition at line 963 of file class.c.
References err, free(), malloc(), PFMT64u, rz_analysis_class_add_attr_unique(), RZ_ANALYSIS_CLASS_ATTR_TYPE_BASE, rz_analysis_class_set_attr(), rz_str_newf(), and SDB_SS.
Referenced by rz_analysis_class_base_rename_class_cb(), and rz_analysis_class_base_set().
RZ_API RzAnalysisClassErr rz_analysis_class_create | ( | RzAnalysis * | analysis, |
const char * | name | ||
) |
Definition at line 79 of file class.c.
References err, rz_analysis_t::ev, free(), key, key_class(), rz_event_class_t::name, RZ_EVENT_CLASS_NEW, rz_event_send(), rz_str_sanitize_sdb_key(), rz_analysis_t::sdb_classes, sdb_exists(), and sdb_set().
Referenced by recovery_apply_complete_object_locator(), recovery_apply_type_descriptor(), rz_analysis_class_add_handler(), rz_analysis_class_recover_from_rzbin(), and rz_analysis_rtti_itanium_recover_all().
RZ_API void rz_analysis_class_delete | ( | RzAnalysis * | analysis, |
const char * | name | ||
) |
Definition at line 98 of file class.c.
References rz_analysis_t::ev, free(), key, key_attr_content(), key_attr_content_specific(), key_attr_type_attrs(), key_attr_types(), key_class(), rz_event_class_t::name, rz_analysis_class_base_delete_class(), rz_analysis_class_method_delete_class(), rz_analysis_class_vtable_delete_class(), RZ_EVENT_CLASS_DEL, rz_event_send(), rz_str_sanitize_sdb_key(), sdb_aforeach, sdb_aforeach_next, rz_analysis_t::sdb_classes, rz_analysis_t::sdb_classes_attrs, sdb_get(), and sdb_remove().
Referenced by rz_analysis_class_del_handler().
|
static |
Definition at line 400 of file class.c.
References err, free(), rz_analysis_class_delete_attr_raw(), and rz_str_sanitize_sdb_key().
Referenced by rz_analysis_class_base_delete().
|
static |
Definition at line 367 of file class.c.
References attr_type_id(), rz_event_class_attr_t::class_name, rz_analysis_t::ev, free(), key, key_attr_content(), key_attr_content_specific(), key_attr_type_attrs(), key_attr_types(), RZ_EVENT_CLASS_ATTR_DEL, rz_event_send(), sdb_array_remove(), rz_analysis_t::sdb_classes_attrs, sdb_exists(), and sdb_remove().
Referenced by rz_analysis_class_delete_attr(), rz_analysis_class_method_delete(), and rz_analysis_class_vtable_delete().
RZ_API bool rz_analysis_class_exists | ( | RzAnalysis * | analysis, |
const char * | name | ||
) |
Definition at line 167 of file class.c.
References free(), r, rz_analysis_class_exists_raw(), and rz_str_sanitize_sdb_key().
Referenced by rz_analysis_class_base_list_handler(), rz_analysis_class_info_handler(), rz_analysis_class_recover_from_rzbin(), rz_analysis_class_rename(), rz_analysis_class_vtable_list_handler(), rz_analysis_class_vtable_lookup_handler(), and unique_class_name().
|
static |
Definition at line 163 of file class.c.
References key_class(), rz_analysis_t::sdb_classes, and sdb_exists().
Referenced by rz_analysis_class_base_set(), rz_analysis_class_exists(), and rz_analysis_class_set_attr_raw().
RZ_API void rz_analysis_class_foreach | ( | RzAnalysis * | analysis, |
SdbForeachCallback | cb, | ||
void * | user | ||
) |
Definition at line 181 of file class.c.
References cb, rz_analysis_t::sdb_classes, and sdb_foreach().
Referenced by analysis_class_list_print_to_json(), rz_analysis_class_base_delete_class(), and rz_analysis_class_base_rename_class().
RZ_API SdbList* rz_analysis_class_get_all | ( | RzAnalysis * | analysis, |
bool | sorted | ||
) |
Definition at line 177 of file class.c.
References rz_analysis_t::sdb_classes, and sdb_foreach_list().
Referenced by rz_analysis_class_get_inheritance_graph(), rz_analysis_class_list_handler(), rz_analysis_class_vtable_lookup_handler(), and rz_core_visual_analysis_classes().
|
static |
Definition at line 291 of file class.c.
References free(), rz_analysis_class_get_attr_raw(), and rz_str_sanitize_sdb_key().
Referenced by rz_analysis_class_base_get(), rz_analysis_class_method_exists(), rz_analysis_class_method_get(), and rz_analysis_class_vtable_get().
|
static |
Definition at line 277 of file class.c.
References attr_type_id(), free(), key, key_attr_content(), key_attr_content_specific(), NULL, rz_analysis_t::sdb_classes_attrs, and sdb_get().
Referenced by rz_analysis_class_get_attr().
RZ_API RzGraph* rz_analysis_class_get_inheritance_graph | ( | RzAnalysis * | analysis | ) |
Creates RzGraph from class inheritance information where each node has RzGraphNodeInfo as generic data.
analysis |
Definition at line 1261 of file class.c.
References classes(), ls_foreach, ls_free(), NULL, rz_analysis_class_base_get_all(), rz_analysis_class_get_all(), rz_graph_add_edge(), rz_graph_add_node_info(), rz_graph_free(), rz_graph_new(), rz_return_val_if_fail, rz_vector_foreach, rz_vector_free(), and sdbkv_key().
Referenced by rz_analysis_class_graph_handler().
RZ_API RzAnalysisClassErr rz_analysis_class_method_delete | ( | RzAnalysis * | analysis, |
const char * | class_name, | ||
const char * | meth_name | ||
) |
Definition at line 855 of file class.c.
References err, flagname_method(), fn, free(), RZ_ANALYSIS_CLASS_ATTR_TYPE_METHOD, rz_analysis_class_delete_attr_raw(), rz_analysis_class_unset_flag(), and rz_str_sanitize_sdb_key().
Referenced by rz_analysis_class_method_del_handler().
|
static |
Definition at line 834 of file class.c.
References attr_type_id(), flagname_method(), fn, free(), key, key_attr_type_attrs(), RZ_ANALYSIS_CLASS_ATTR_TYPE_METHOD, rz_analysis_class_unset_flag(), sdb_aforeach, sdb_aforeach_next, rz_analysis_t::sdb_classes_attrs, and sdb_get().
Referenced by rz_analysis_class_delete().
RZ_API bool rz_analysis_class_method_exists | ( | RzAnalysis * | analysis, |
const char * | class_name, | ||
const char * | meth_name | ||
) |
Definition at line 634 of file class.c.
References RZ_ANALYSIS_CLASS_ATTR_TYPE_METHOD, and rz_analysis_class_get_attr().
Referenced by rz_analysis_class_method_recover().
RZ_API bool rz_analysis_class_method_exists_by_addr | ( | RzAnalysis * | analysis, |
const char * | class_name, | ||
ut64 | addr | ||
) |
Definition at line 643 of file class.c.
References addr, rz_analysis_class_method_get_all(), rz_vector_foreach, and rz_vector_free().
Referenced by recovery_apply_vtable().
RZ_API void rz_analysis_class_method_fini | ( | RzAnalysisMethod * | meth | ) |
Definition at line 606 of file class.c.
References free().
Referenced by recovery_apply_vtable(), rz_analysis_class_method_add_handler(), rz_analysis_class_method_fini_proxy(), rz_analysis_class_method_recover(), and rz_analysis_class_method_rename().
|
static |
Definition at line 729 of file class.c.
References e, and rz_analysis_class_method_fini().
Referenced by rz_analysis_class_method_get_all().
RZ_API RzAnalysisClassErr rz_analysis_class_method_get | ( | RzAnalysis * | analysis, |
const char * | class_name, | ||
const char * | meth_name, | ||
RzAnalysisMethod * | meth | ||
) |
Definition at line 682 of file class.c.
References free(), NULL, RZ_ANALYSIS_CLASS_ATTR_TYPE_METHOD, rz_analysis_class_get_attr(), rz_num_math(), rz_str_new(), rz_str_sanitize_sdb_key(), and sdb_anext().
Referenced by rz_analysis_class_method_get_all(), and rz_analysis_class_method_rename().
RZ_API RzVector* rz_analysis_class_method_get_all | ( | RzAnalysis * | analysis, |
const char * | class_name | ||
) |
Definition at line 735 of file class.c.
References attr_type_id(), free(), key, key_attr_type_attrs(), NULL, RZ_ANALYSIS_CLASS_ATTR_TYPE_METHOD, rz_analysis_class_method_fini_proxy(), rz_analysis_class_method_get(), rz_str_sanitize_sdb_key(), rz_vector_free(), rz_vector_new(), rz_vector_push(), rz_vector_reserve(), sdb_aforeach, sdb_aforeach_next, sdb_alen(), rz_analysis_t::sdb_classes_attrs, and sdb_get().
Referenced by analysis_class_print(), analysis_class_print_as_cmd(), analysis_class_print_to_json(), detect_constructor_destructor(), rz_analysis_class_method_exists_by_addr(), and rz_analysis_class_method_get_by_addr().
RZ_API RzAnalysisClassErr rz_analysis_class_method_get_by_addr | ( | RzAnalysis * | analysis, |
const char * | class_name, | ||
ut64 | addr, | ||
RzAnalysisMethod * | method | ||
) |
Definition at line 659 of file class.c.
References addr, rz_analysis_class_method_get_all(), rz_str_new(), rz_vector_foreach, and rz_vector_free().
Referenced by recovery_apply_vtable().
RZ_API void rz_analysis_class_method_recover | ( | RzAnalysis * | analysis, |
RzBinClass * | cls, | ||
RzList * | methods | ||
) |
Definition at line 611 of file class.c.
References cls(), rz_analysis_function_t::name, rz_bin_symbol_t::name, rz_analysis_class_method_exists(), rz_analysis_class_method_fini(), rz_analysis_class_method_set(), rz_analysis_get_function_at(), rz_list_sort(), rz_str_new(), rz_str_split(), symbol_method_sort_by_addr(), and rz_bin_symbol_t::vaddr.
Referenced by rz_analysis_class_recover_from_rzbin().
RZ_API RzAnalysisClassErr rz_analysis_class_method_rename | ( | RzAnalysis * | analysis, |
const char * | class_name, | ||
const char * | old_meth_name, | ||
const char * | new_meth_name | ||
) |
Definition at line 788 of file class.c.
References err, flagname_method(), free(), RZ_ANALYSIS_CLASS_ATTR_TYPE_METHOD, rz_analysis_class_method_fini(), rz_analysis_class_method_get(), rz_analysis_class_method_set(), rz_analysis_class_rename_attr(), rz_analysis_class_rename_flag(), and rz_str_new().
Referenced by rz_analysis_class_method_rename_handler().
|
static |
Definition at line 810 of file class.c.
References attr_type_id(), flagname_method(), free(), key, key_attr_type_attrs(), RZ_ANALYSIS_CLASS_ATTR_TYPE_METHOD, rz_analysis_class_rename_flag(), sdb_aforeach, sdb_aforeach_next, rz_analysis_t::sdb_classes_attrs, and sdb_get().
Referenced by rz_analysis_class_rename().
RZ_API RzAnalysisClassErr rz_analysis_class_method_set | ( | RzAnalysis * | analysis, |
const char * | class_name, | ||
RzAnalysisMethod * | meth | ||
) |
Definition at line 770 of file class.c.
References err, flagname_method(), fn, free(), PFMT32u, PFMT64d, PFMT64u, RZ_ANALYSIS_CLASS_ATTR_TYPE_METHOD, rz_analysis_class_set_attr(), rz_analysis_class_set_flag(), rz_str_newf(), and SDB_RS.
Referenced by detect_constructor_destructor(), recovery_apply_vtable(), rz_analysis_class_method_add_handler(), rz_analysis_class_method_recover(), and rz_analysis_class_method_rename().
RZ_API void rz_analysis_class_recover_all | ( | RzAnalysis * | analysis | ) |
Definition at line 1321 of file class.c.
References rz_analysis_class_recover_from_rzbin(), and rz_analysis_rtti_recover_all().
Referenced by rz_core_analysis_everything().
RZ_API void rz_analysis_class_recover_from_rzbin | ( | RzAnalysis * | analysis | ) |
Definition at line 57 of file class.c.
References rz_bin_bind_t::bin, rz_analysis_t::binb, classes(), NULL, rz_analysis_class_create(), rz_analysis_class_exists(), rz_analysis_class_method_recover(), rz_bin_get_classes(), rz_cons_break_pop(), rz_cons_break_push(), and rz_cons_is_breaked().
Referenced by rz_analysis_class_recover_all().
RZ_API RzAnalysisClassErr rz_analysis_class_rename | ( | RzAnalysis * | analysis, |
const char * | old_name, | ||
const char * | new_name | ||
) |
Definition at line 196 of file class.c.
References err, rz_analysis_t::ev, free(), key, key_attr_content(), key_attr_type_attrs(), key_attr_types(), key_class(), rz_event_class_rename_t::name_old, rename_key(), rz_analysis_class_base_rename_class(), rz_analysis_class_exists(), rz_analysis_class_method_rename_class(), rz_analysis_class_vtable_rename_class(), RZ_EVENT_CLASS_RENAME, rz_event_send(), rz_str_sanitize_sdb_key(), sdb_aforeach, sdb_aforeach_next, rz_analysis_t::sdb_classes, rz_analysis_t::sdb_classes_attrs, and sdb_get().
Referenced by rz_analysis_class_rename_handler().
|
static |
Definition at line 475 of file class.c.
References free(), rz_analysis_class_rename_attr_raw(), and rz_str_sanitize_sdb_key().
Referenced by rz_analysis_class_method_rename().
|
static |
Definition at line 419 of file class.c.
References rz_event_class_attr_rename_t::attr, attr_type_id(), rz_event_class_attr_t::class_name, rz_analysis_t::ev, free(), key, key_attr_content(), key_attr_content_specific(), key_attr_type_attrs(), RZ_EVENT_CLASS_ATTR_RENAME, rz_event_send(), sdb_array_add(), sdb_array_contains(), sdb_array_remove(), rz_analysis_t::sdb_classes_attrs, sdb_get(), sdb_remove(), and sdb_set().
Referenced by rz_analysis_class_rename_attr().
|
static |
Definition at line 543 of file class.c.
References addr, rz_flag_bind_t::f, rz_analysis_t::flb, rz_analysis_t::flg_class_get, rz_analysis_t::flg_class_set, rz_flag_item_t::offset, rz_flag_bind_t::unset, and ut64().
Referenced by rz_analysis_class_method_rename(), rz_analysis_class_method_rename_class(), and rz_analysis_class_vtable_rename_class().
|
static |
Definition at line 347 of file class.c.
References err, free(), rz_analysis_class_set_attr_raw(), and rz_str_sanitize_sdb_key().
Referenced by rz_analysis_class_add_attr_unique_raw(), rz_analysis_class_base_set_raw(), rz_analysis_class_method_set(), and rz_analysis_class_vtable_set().
|
static |
Definition at line 311 of file class.c.
References rz_event_class_attr_set_t::attr, attr_type_id(), rz_event_class_attr_t::class_name, rz_analysis_t::ev, free(), key, key_attr_content(), key_attr_type_attrs(), key_attr_types(), rz_analysis_class_exists_raw(), RZ_EVENT_CLASS_ATTR_SET, rz_event_send(), sdb_array_add(), rz_analysis_t::sdb_classes_attrs, and sdb_set().
Referenced by rz_analysis_class_set_attr().
|
static |
Definition at line 527 of file class.c.
References addr, rz_flag_bind_t::f, rz_analysis_t::flb, and rz_analysis_t::flg_class_set.
Referenced by rz_analysis_class_method_set(), and rz_analysis_class_vtable_set().
|
static |
Definition at line 498 of file class.c.
References attr_type_id(), free(), key, key_attr_type_attrs(), out, PFMT64u, sdb_array_contains(), rz_analysis_t::sdb_classes_attrs, snprintf, and ut64().
Referenced by rz_analysis_class_add_attr_unique_raw().
|
static |
Definition at line 534 of file class.c.
References rz_flag_bind_t::f, rz_analysis_t::flb, rz_analysis_t::flg_class_get, and rz_flag_bind_t::unset_name.
Referenced by rz_analysis_class_method_delete(), rz_analysis_class_method_delete_class(), rz_analysis_class_vtable_delete(), and rz_analysis_class_vtable_delete_class().
RZ_API RzAnalysisClassErr rz_analysis_class_vtable_delete | ( | RzAnalysis * | analysis, |
const char * | class_name, | ||
const char * | vtable_id | ||
) |
Definition at line 1235 of file class.c.
References err, flagname_vtable(), free(), RZ_ANALYSIS_CLASS_ATTR_TYPE_VTABLE, rz_analysis_class_delete_attr_raw(), rz_analysis_class_unset_flag(), and rz_str_sanitize_sdb_key().
Referenced by rz_analysis_class_vtable_del_handler().
|
static |
Definition at line 1217 of file class.c.
References attr_type_id(), flagname_vtable(), free(), key, key_attr_type_attrs(), RZ_ANALYSIS_CLASS_ATTR_TYPE_VTABLE, rz_analysis_class_unset_flag(), sdb_aforeach, sdb_aforeach_next, rz_analysis_t::sdb_classes_attrs, and sdb_get().
Referenced by rz_analysis_class_delete().
RZ_API void rz_analysis_class_vtable_fini | ( | RzAnalysisVTable * | vtable | ) |
Definition at line 1069 of file class.c.
References free().
Referenced by recovery_apply_vtable(), rz_analysis_class_vtable_add_handler(), and rz_analysis_class_vtable_fini_proxy().
|
static |
Definition at line 1112 of file class.c.
References e, and rz_analysis_class_vtable_fini().
Referenced by rz_analysis_class_vtable_get_all().
RZ_API RzAnalysisClassErr rz_analysis_class_vtable_get | ( | RzAnalysis * | analysis, |
const char * | class_name, | ||
const char * | vtable_id, | ||
RzAnalysisVTable * | vtable | ||
) |
Definition at line 1073 of file class.c.
References free(), NULL, RZ_ANALYSIS_CLASS_ATTR_TYPE_VTABLE, rz_analysis_class_get_attr(), rz_num_get(), rz_num_math(), rz_str_sanitize_sdb_key(), and sdb_anext().
Referenced by rz_analysis_class_vtable_get_all().
RZ_API RzVector* rz_analysis_class_vtable_get_all | ( | RzAnalysis * | analysis, |
const char * | class_name | ||
) |
Definition at line 1118 of file class.c.
References attr_type_id(), free(), key, key_attr_type_attrs(), NULL, RZ_ANALYSIS_CLASS_ATTR_TYPE_VTABLE, rz_analysis_class_vtable_fini_proxy(), rz_analysis_class_vtable_get(), rz_str_sanitize_sdb_key(), rz_vector_free(), rz_vector_new(), rz_vector_push(), rz_vector_reserve(), sdb_aforeach, sdb_aforeach_next, sdb_alen(), rz_analysis_t::sdb_classes_attrs, and sdb_get().
Referenced by analysis_class_print(), analysis_class_print_as_cmd(), analysis_class_print_to_json(), list_all_functions_at_vtable_offset(), rz_analysis_class_vtable_list_handler(), and rz_analysis_class_vtable_set().
|
static |
Definition at line 1193 of file class.c.
References attr_type_id(), flagname_vtable(), free(), key, key_attr_type_attrs(), RZ_ANALYSIS_CLASS_ATTR_TYPE_VTABLE, rz_analysis_class_rename_flag(), sdb_aforeach, sdb_aforeach_next, rz_analysis_t::sdb_classes_attrs, and sdb_get().
Referenced by rz_analysis_class_rename().
RZ_API RzAnalysisClassErr rz_analysis_class_vtable_set | ( | RzAnalysis * | analysis, |
const char * | class_name, | ||
RzAnalysisVTable * | vtable | ||
) |
Definition at line 1153 of file class.c.
References err, flagname_vtable(), free(), malloc(), PFMT64u, PFMT64x, r, rz_analysis_class_add_attr_unique(), RZ_ANALYSIS_CLASS_ATTR_TYPE_VTABLE, rz_analysis_class_set_attr(), rz_analysis_class_set_flag(), rz_analysis_class_vtable_get_all(), rz_str_newf(), rz_vector_foreach, rz_vector_free(), and SDB_SS.
Referenced by recovery_apply_vtable(), and rz_analysis_class_vtable_add_handler().