Rizin
unix-like reverse engineering framework and cli tools
|
#include <rz_util/rz_serialize.h>
#include <rz_util/rz_num.h>
#include <rz_vector.h>
#include <rz_type.h>
#include <rz_analysis.h>
#include <rz_core.h>
#include <errno.h>
Go to the source code of this file.
Classes | |
struct | BlockLoadCtx |
struct | GlobalVarCtx |
struct | FunctionLoadCtx |
struct | HintsAtAddr |
struct | HintsLoadCtx |
Macros | |
#define | FLUSH |
#define | SUB(ns, call) RZ_SERIALIZE_SUB_DO(db, subdb, res, ns, call, goto beach;) |
#define FLUSH |
#define SUB | ( | ns, | |
call | |||
) | RZ_SERIALIZE_SUB_DO(db, subdb, res, ns, call, goto beach;) |
anonymous enum |
Enumerator | |
---|---|
DIFF_FIELD_TYPE | |
DIFF_FIELD_ADDR | |
DIFF_FIELD_DIST | |
DIFF_FIELD_NAME | |
DIFF_FIELD_SIZE |
Definition at line 89 of file serialize_analysis.c.
anonymous enum |
Definition at line 323 of file serialize_analysis.c.
anonymous enum |
Enumerator | |
---|---|
VAR_FIELD_NAME | |
VAR_FIELD_TYPE | |
VAR_FIELD_KIND | |
VAR_FIELD_ARG | |
VAR_FIELD_DELTA | |
VAR_FIELD_REG | |
VAR_FIELD_COMMENT | |
VAR_FIELD_ACCS | |
VAR_FIELD_CONSTRS |
Definition at line 634 of file serialize_analysis.c.
anonymous enum |
Enumerator | |
---|---|
GLOBAL_VAR_FIELD_NAME | |
GLOBAL_VAR_FIELD_ADDR | |
GLOBAL_VAR_FIELD_TYPE | |
GLOBAL_VAR_FIELD_CONSTRS |
Definition at line 908 of file serialize_analysis.c.
anonymous enum |
Definition at line 1152 of file serialize_analysis.c.
anonymous enum |
Definition at line 1932 of file serialize_analysis.c.
Definition at line 1810 of file serialize_analysis.c.
References addr, h, and hints_at_addr().
Referenced by rz_serialize_analysis_hints_save().
|
static |
Definition at line 1819 of file serialize_analysis.c.
References addr, arch, h, and hints_at_addr().
Referenced by rz_serialize_analysis_hints_save().
Definition at line 1829 of file serialize_analysis.c.
References addr, bits(), h, and hints_at_addr().
Referenced by rz_serialize_analysis_hints_save().
Definition at line 346 of file serialize_analysis.c.
References BLOCK_FIELD_COLORIZE, BLOCK_FIELD_FAIL, BLOCK_FIELD_FINGERPRINT, BLOCK_FIELD_JUMP, BLOCK_FIELD_TRACED, rz_analysis_bb_t::cmpval, rz_analysis_bb_t::colorize, rz_analysis_bb_t::fail, rz_analysis_bb_t::fingerprint, free(), if(), INT_MAX, rz_analysis_bb_t::jump, malloc(), n, NULL, rz_analysis_bb_t::parent_stackptr, realloc(), rz_base64_decode(), RZ_JSON_BOOLEAN, RZ_JSON_INTEGER, RZ_JSON_OBJECT, rz_json_parse(), RZ_KEY_PARSER_JSON, rz_analysis_bb_t::size, SIZE_MAX, strdup(), rz_analysis_bb_t::traced, rz_json_t::type, UT64_MAX, and v.
Referenced by rz_serialize_analysis_blocks_load().
|
static |
Definition at line 239 of file serialize_analysis.c.
References rz_analysis_bb_t::cmpreg, rz_analysis_bb_t::cmpval, rz_analysis_bb_t::colorize, rz_analysis_bb_t::diff, rz_analysis_bb_t::fail, rz_analysis_bb_t::fingerprint, free(), i, INT_MAX, rz_analysis_bb_t::jump, key, rz_analysis_bb_t::ninstr, rz_analysis_bb_t::op_pos, rz_analysis_bb_t::parent_stackptr, pj_a(), pj_end(), pj_free(), pj_k(), pj_kb(), pj_ki(), pj_kn(), pj_ks(), pj_n(), pj_new(), pj_o(), pj_string(), rz_base64_encode_dyn(), rz_serialize_analysis_diff_save(), rz_serialize_analysis_switch_op_save(), sdb_set(), rz_analysis_bb_t::size, rz_analysis_bb_t::stackptr, rz_analysis_bb_t::switch_op, rz_analysis_bb_t::traced, ut64(), and UT64_MAX.
Referenced by rz_serialize_analysis_blocks_save().
Definition at line 1179 of file serialize_analysis.c.
References rz_json_t::children, free(), FUNCTION_FIELD_BBS, FUNCTION_FIELD_BITS, FUNCTION_FIELD_BP_FRAME, FUNCTION_FIELD_BP_OFF, FUNCTION_FIELD_CC, FUNCTION_FIELD_DIFF, FUNCTION_FIELD_FINGERPRINT, FUNCTION_FIELD_IMPORTS, FUNCTION_FIELD_LABELS, FUNCTION_FIELD_MAXSTACK, FUNCTION_FIELD_NINSTR, FUNCTION_FIELD_NORETURN, FUNCTION_FIELD_PURE, FUNCTION_FIELD_STACK, FUNCTION_FIELD_TYPE, FUNCTION_FIELD_VARS, if(), rz_json_t::key, malloc(), n, rz_json_t::next, NULL, rz_json_t::num, realloc(), rz_analysis_diff_free(), rz_analysis_function_add_block(), rz_analysis_function_new(), rz_analysis_function_set_label(), rz_analysis_get_block_at(), rz_base64_decode(), RZ_JSON_ARRAY, RZ_JSON_BOOLEAN, RZ_JSON_INTEGER, RZ_JSON_OBJECT, rz_json_parse(), RZ_JSON_STRING, RZ_KEY_PARSER_JSON, rz_list_newf(), rz_list_push(), rz_serialize_analysis_diff_load(), rz_str_constpool_get(), rz_json_t::str_value, strdup(), rz_json_t::type, and v.
Referenced by rz_serialize_analysis_functions_load().
|
static |
Definition at line 1060 of file serialize_analysis.c.
References rz_analysis_bb_t::addr, free(), key, pj_end(), pj_free(), pj_k(), pj_ka(), pj_kb(), pj_ki(), pj_kN(), pj_ko(), pj_ks(), pj_n(), pj_new(), pj_o(), pj_s(), pj_string(), rz_base64_encode_dyn(), rz_pvector_empty(), rz_pvector_foreach, rz_serialize_analysis_diff_save(), rz_serialize_analysis_var_save(), sdb_set(), and store_label_cb().
Referenced by rz_serialize_analysis_functions_save().
Definition at line 936 of file serialize_analysis.c.
References addr, rz_json_t::children, rz_type_constraint_t::cond, free(), GLOBAL_VAR_FIELD_ADDR, GLOBAL_VAR_FIELD_TYPE, if(), rz_json_t::next, NULL, rz_json_t::num, RZ_JSON_INTEGER, RZ_JSON_OBJECT, rz_json_parse(), RZ_JSON_STRING, RZ_KEY_PARSER_JSON, RZ_TYPE_COND_AL, RZ_TYPE_COND_LS, rz_vector_init(), rz_vector_push(), strdup(), type, rz_json_t::type, ut64(), v, and VAR_FIELD_CONSTRS.
Referenced by rz_serialize_analysis_global_var_load().
Definition at line 1839 of file serialize_analysis.c.
References addr, h, key, PFMT64x, pj_end(), pj_free(), pj_k(), pj_kb(), pj_ki(), pj_kn(), pj_ks(), pj_new(), pj_null(), pj_o(), pj_s(), pj_string(), RZ_ANALYSIS_ADDR_HINT_TYPE_ESIL, RZ_ANALYSIS_ADDR_HINT_TYPE_FAIL, RZ_ANALYSIS_ADDR_HINT_TYPE_HIGH, RZ_ANALYSIS_ADDR_HINT_TYPE_IMMBASE, RZ_ANALYSIS_ADDR_HINT_TYPE_JUMP, RZ_ANALYSIS_ADDR_HINT_TYPE_NEW_BITS, RZ_ANALYSIS_ADDR_HINT_TYPE_NWORD, RZ_ANALYSIS_ADDR_HINT_TYPE_OPCODE, RZ_ANALYSIS_ADDR_HINT_TYPE_OPTYPE, RZ_ANALYSIS_ADDR_HINT_TYPE_PTR, RZ_ANALYSIS_ADDR_HINT_TYPE_RET, RZ_ANALYSIS_ADDR_HINT_TYPE_SIZE, RZ_ANALYSIS_ADDR_HINT_TYPE_STACKFRAME, RZ_ANALYSIS_ADDR_HINT_TYPE_SYNTAX, RZ_ANALYSIS_ADDR_HINT_TYPE_TYPE_OFFSET, RZ_ANALYSIS_ADDR_HINT_TYPE_VAL, rz_vector_foreach, sdb_set(), snprintf, and v.
Referenced by rz_serialize_analysis_hints_save().
|
static |
Definition at line 1797 of file serialize_analysis.c.
References addr, h, NULL, and RZ_NEW0.
Referenced by addr_hint_acc_cb(), arch_hint_acc_cb(), and bits_hint_acc_cb().
|
static |
Definition at line 1793 of file serialize_analysis.c.
References free().
Referenced by rz_serialize_analysis_hints_save().
Definition at line 1958 of file serialize_analysis.c.
References addr, free(), HINTS_FIELD_ESIL, HINTS_FIELD_FAIL, HINTS_FIELD_HIGH, HINTS_FIELD_JUMP, HINTS_FIELD_NEW_BITS, HINTS_FIELD_NWORD, HINTS_FIELD_OPCODE, HINTS_FIELD_OPTYPE, HINTS_FIELD_PTR, HINTS_FIELD_RET, HINTS_FIELD_SIZE, HINTS_FIELD_STACKFRAME, HINTS_FIELD_SYNTAX, HINTS_FIELD_TYPE_OFFSET, HINTS_FIELD_VAL, if(), k, NULL, rz_analysis_hint_set_esil(), rz_analysis_hint_set_fail(), rz_analysis_hint_set_high(), rz_analysis_hint_set_immbase(), rz_analysis_hint_set_jump(), rz_analysis_hint_set_newbits(), rz_analysis_hint_set_nword(), rz_analysis_hint_set_offset(), rz_analysis_hint_set_opcode(), rz_analysis_hint_set_pointer(), rz_analysis_hint_set_ret(), rz_analysis_hint_set_size(), rz_analysis_hint_set_stackframe(), rz_analysis_hint_set_syntax(), rz_analysis_hint_set_type(), rz_analysis_hint_set_val(), RZ_JSON_BOOLEAN, RZ_JSON_INTEGER, RZ_JSON_OBJECT, rz_json_parse(), RZ_JSON_STRING, RZ_KEY_PARSER_JSON, strdup(), rz_json_t::type, ut64(), and v.
Referenced by rz_serialize_analysis_hints_load().
Definition at line 2176 of file serialize_analysis.c.
References k, and rz_analysis_add_import().
Referenced by rz_serialize_analysis_imports_load().
Definition at line 1640 of file serialize_analysis.c.
References addr, rz_json_t::children, test_evm::end, error(), free(), int, k, rz_json_t::key, rz_analysis_t::meta, rz_analysis_t::meta_spaces, rz_json_t::next, NULL, rz_json_t::num, rz_interval_tree_insert(), RZ_JSON_ARRAY, rz_json_free(), RZ_JSON_INTEGER, RZ_JSON_OBJECT, rz_json_parse(), RZ_JSON_STRING, RZ_META_TYPE_ANY, RZ_META_TYPE_CODE, RZ_META_TYPE_COMMENT, RZ_META_TYPE_DATA, RZ_META_TYPE_FORMAT, RZ_META_TYPE_HIDE, RZ_META_TYPE_HIGHLIGHT, RZ_META_TYPE_MAGIC, RZ_META_TYPE_STRING, RZ_META_TYPE_VARTYPE, RZ_NEW0, rz_spaces_get(), rz_analysis_meta_item_t::space, cmd_descs_generate::str, rz_analysis_meta_item_t::str, rz_json_t::str_value, strdup(), rz_analysis_meta_item_t::subtype, type, rz_analysis_meta_item_t::type, rz_json_t::type, ut64(), UT64_MAX, and v.
Referenced by rz_serialize_analysis_meta_load().
RZ_API bool rz_serialize_analysis_blocks_load | ( | RZ_NONNULL Sdb * | db, |
RZ_NONNULL RzAnalysis * | analysis, | ||
RzSerializeAnalDiffParser | diff_parser, | ||
RZ_NULLABLE RzSerializeResultInfo * | res | ||
) |
Definition at line 530 of file serialize_analysis.c.
References BLOCK_FIELD_CMPREG, BLOCK_FIELD_CMPVAL, BLOCK_FIELD_COLORIZE, BLOCK_FIELD_DIFF, BLOCK_FIELD_FAIL, BLOCK_FIELD_FINGERPRINT, BLOCK_FIELD_JUMP, BLOCK_FIELD_NINSTR, BLOCK_FIELD_OP_POS, BLOCK_FIELD_PARENT_STACKPTR, BLOCK_FIELD_SIZE, BLOCK_FIELD_STACKPTR, BLOCK_FIELD_SWITCH_OP, BLOCK_FIELD_TRACED, block_load_cb(), rz_key_parser_add(), rz_key_parser_free(), rz_key_parser_new(), RZ_SERIALIZE_ERR, and sdb_foreach().
Referenced by rz_serialize_analysis_load().
RZ_API void rz_serialize_analysis_blocks_save | ( | RZ_NONNULL Sdb * | db, |
RZ_NONNULL RzAnalysis * | analysis | ||
) |
Definition at line 312 of file serialize_analysis.c.
References rz_analysis_bb_t::addr, block_store(), key, PFMT64x, rz_rbtree_foreach, rz_strbuf_fini(), rz_strbuf_get(), and rz_strbuf_setf().
Referenced by rz_serialize_analysis_save().
RZ_API bool rz_serialize_analysis_callables_load | ( | RZ_NONNULL Sdb * | db, |
RZ_NONNULL RzAnalysis * | analysis, | ||
RZ_NULLABLE RzSerializeResultInfo * | res | ||
) |
Definition at line 2156 of file serialize_analysis.c.
References rz_serialize_callables_load().
Referenced by rz_serialize_analysis_load().
RZ_API void rz_serialize_analysis_callables_save | ( | RZ_NONNULL Sdb * | db, |
RZ_NONNULL RzAnalysis * | analysis | ||
) |
Definition at line 2152 of file serialize_analysis.c.
References rz_serialize_callables_save().
Referenced by rz_serialize_analysis_save().
RZ_API void rz_serialize_analysis_case_op_save | ( | RZ_NONNULL PJ * | j, |
RZ_NONNULL RzAnalysisCaseOp * | op | ||
) |
Definition at line 165 of file serialize_analysis.c.
References pj_end(), pj_kn(), and pj_o().
Referenced by rz_serialize_analysis_switch_op_save().
RZ_API bool rz_serialize_analysis_cc_load | ( | RZ_NONNULL Sdb * | db, |
RZ_NONNULL RzAnalysis * | analysis, | ||
RZ_NULLABLE RzSerializeResultInfo * | res | ||
) |
Definition at line 2189 of file serialize_analysis.c.
References sdb_copy().
Referenced by rz_serialize_analysis_load().
RZ_API void rz_serialize_analysis_cc_save | ( | RZ_NONNULL Sdb * | db, |
RZ_NONNULL RzAnalysis * | analysis | ||
) |
Definition at line 2185 of file serialize_analysis.c.
References sdb_copy().
Referenced by rz_serialize_analysis_save().
RZ_API bool rz_serialize_analysis_classes_load | ( | RZ_NONNULL Sdb * | db, |
RZ_NONNULL RzAnalysis * | analysis, | ||
RZ_NULLABLE RzSerializeResultInfo * | res | ||
) |
Definition at line 2133 of file serialize_analysis.c.
References RZ_SERIALIZE_ERR, sdb_copy(), sdb_ns(), and sdb_reset().
Referenced by rz_serialize_analysis_load().
RZ_API void rz_serialize_analysis_classes_save | ( | RZ_NONNULL Sdb * | db, |
RZ_NONNULL RzAnalysis * | analysis | ||
) |
Definition at line 2129 of file serialize_analysis.c.
References sdb_copy().
Referenced by rz_serialize_analysis_save().
RZ_API RZ_NULLABLE RzAnalysisDiff* rz_serialize_analysis_diff_load | ( | RZ_NONNULL RzSerializeAnalDiffParser | parser, |
RZ_NONNULL const RzJson * | json | ||
) |
Definition at line 114 of file serialize_analysis.c.
References rz_analysis_diff_t::addr, DIFF_FIELD_ADDR, DIFF_FIELD_DIST, DIFF_FIELD_NAME, DIFF_FIELD_SIZE, DIFF_FIELD_TYPE, free(), if(), rz_analysis_diff_t::name, NULL, cmd_descs_generate::parser, rz_analysis_diff_new(), RZ_JSON_DOUBLE, RZ_JSON_INTEGER, RZ_JSON_OBJECT, RZ_JSON_STRING, RZ_KEY_PARSER_JSON, rz_analysis_diff_t::size, and strdup().
Referenced by function_load_cb().
RZ_API void rz_serialize_analysis_diff_parser_free | ( | RzSerializeAnalDiffParser | parser | ) |
Definition at line 110 of file serialize_analysis.c.
References cmd_descs_generate::parser, and rz_key_parser_free().
Referenced by rz_serialize_analysis_load().
RZ_API RzSerializeAnalDiffParser rz_serialize_analysis_diff_parser_new | ( | void | ) |
Definition at line 97 of file serialize_analysis.c.
References DIFF_FIELD_ADDR, DIFF_FIELD_DIST, DIFF_FIELD_NAME, DIFF_FIELD_SIZE, DIFF_FIELD_TYPE, NULL, cmd_descs_generate::parser, rz_key_parser_add(), and rz_key_parser_new().
Referenced by rz_serialize_analysis_load().
RZ_API void rz_serialize_analysis_diff_save | ( | RZ_NONNULL PJ * | j, |
RZ_NONNULL RzAnalysisDiff * | diff | ||
) |
Definition at line 64 of file serialize_analysis.c.
References pj_end(), pj_kd(), pj_kn(), pj_ks(), pj_o(), RZ_ANALYSIS_DIFF_TYPE_MATCH, RZ_ANALYSIS_DIFF_TYPE_UNMATCH, ut64(), and UT64_MAX.
Referenced by block_store(), and function_store().
RZ_API bool rz_serialize_analysis_function_noreturn_load | ( | RZ_NONNULL Sdb * | db, |
RZ_NONNULL RzAnalysis * | analysis, | ||
RZ_NULLABLE RzSerializeResultInfo * | res | ||
) |
Definition at line 1437 of file serialize_analysis.c.
References sdb_copy(), and sdb_reset().
Referenced by rz_serialize_analysis_load().
RZ_API void rz_serialize_analysis_function_noreturn_save | ( | RZ_NONNULL Sdb * | db, |
RZ_NONNULL RzAnalysis * | analysis | ||
) |
Definition at line 1433 of file serialize_analysis.c.
References sdb_copy().
Referenced by rz_serialize_analysis_save().
RZ_API bool rz_serialize_analysis_functions_load | ( | RZ_NONNULL Sdb * | db, |
RZ_NONNULL RzAnalysis * | analysis, | ||
RzSerializeAnalDiffParser | diff_parser, | ||
RZ_NULLABLE RzSerializeResultInfo * | res | ||
) |
Definition at line 1393 of file serialize_analysis.c.
References FUNCTION_FIELD_BBS, FUNCTION_FIELD_BITS, FUNCTION_FIELD_BP_FRAME, FUNCTION_FIELD_BP_OFF, FUNCTION_FIELD_CC, FUNCTION_FIELD_DIFF, FUNCTION_FIELD_FINGERPRINT, FUNCTION_FIELD_IMPORTS, FUNCTION_FIELD_LABELS, FUNCTION_FIELD_MAXSTACK, FUNCTION_FIELD_NAME, FUNCTION_FIELD_NINSTR, FUNCTION_FIELD_NORETURN, FUNCTION_FIELD_PURE, FUNCTION_FIELD_STACK, FUNCTION_FIELD_TYPE, FUNCTION_FIELD_VARS, function_load_cb(), rz_key_parser_add(), rz_key_parser_free(), rz_key_parser_new(), rz_serialize_analysis_var_parser_free(), rz_serialize_analysis_var_parser_new(), RZ_SERIALIZE_ERR, and sdb_foreach().
Referenced by rz_serialize_analysis_load().
RZ_API void rz_serialize_analysis_functions_save | ( | RZ_NONNULL Sdb * | db, |
RZ_NONNULL RzAnalysis * | analysis | ||
) |
Definition at line 1140 of file serialize_analysis.c.
References function_store(), key, PFMT64x, rz_strbuf_fini(), rz_strbuf_get(), rz_strbuf_init(), and rz_strbuf_setf().
Referenced by rz_serialize_analysis_save().
RZ_API bool rz_serialize_analysis_global_var_load | ( | RZ_NONNULL Sdb * | db, |
RZ_NONNULL RzAnalysis * | analysis, | ||
RZ_NULLABLE RzSerializeResultInfo * | res | ||
) |
Definition at line 1035 of file serialize_analysis.c.
References global_var_load_cb(), rz_key_parser_free(), rz_serialize_analysis_global_var_parser_new(), RZ_SERIALIZE_ERR, and sdb_foreach().
Referenced by rz_serialize_analysis_load().
RZ_API void rz_serialize_analysis_global_var_parser_free | ( | RzSerializeAnalGlobalVarParser | parser | ) |
Definition at line 927 of file serialize_analysis.c.
References cmd_descs_generate::parser, and rz_key_parser_free().
RZ_API RzSerializeAnalGlobalVarParser rz_serialize_analysis_global_var_parser_new | ( | void | ) |
Definition at line 915 of file serialize_analysis.c.
References GLOBAL_VAR_FIELD_ADDR, GLOBAL_VAR_FIELD_CONSTRS, GLOBAL_VAR_FIELD_NAME, GLOBAL_VAR_FIELD_TYPE, NULL, cmd_descs_generate::parser, rz_key_parser_add(), and rz_key_parser_new().
Referenced by rz_serialize_analysis_global_var_load().
RZ_API void rz_serialize_analysis_global_var_save | ( | RZ_NONNULL Sdb * | db, |
RZ_NONNULL RzAnalysis * | anal | ||
) |
Definition at line 866 of file serialize_analysis.c.
References addr, rz_analysis_var_global_t::addr, rz_type_constraint_t::cond, rz_analysis_var_global_t::constraints, free(), rz_analysis_var_global_t::name, PFMT64x, pj_end(), pj_free(), pj_i(), pj_ka(), pj_ks(), pj_n(), pj_new(), pj_o(), pj_reset(), pj_string(), RZ_LOG_ERROR, rz_rbtree_foreach, rz_return_if_fail, rz_strf, rz_type_as_string(), rz_vector_empty(), rz_vector_foreach, sdb_set(), rz_analysis_var_global_t::type, and rz_type_constraint_t::val.
Referenced by rz_serialize_analysis_save().
RZ_API bool rz_serialize_analysis_hints_load | ( | RZ_NONNULL Sdb * | db, |
RZ_NONNULL RzAnalysis * | analysis, | ||
RZ_NULLABLE RzSerializeResultInfo * | res | ||
) |
Definition at line 2091 of file serialize_analysis.c.
References HINTS_FIELD_ARCH, HINTS_FIELD_BITS, HINTS_FIELD_ESIL, HINTS_FIELD_FAIL, HINTS_FIELD_HIGH, HINTS_FIELD_IMMBASE, HINTS_FIELD_JUMP, HINTS_FIELD_NEW_BITS, HINTS_FIELD_NWORD, HINTS_FIELD_OPCODE, HINTS_FIELD_OPTYPE, HINTS_FIELD_PTR, HINTS_FIELD_RET, HINTS_FIELD_SIZE, HINTS_FIELD_STACKFRAME, HINTS_FIELD_SYNTAX, HINTS_FIELD_TYPE_OFFSET, HINTS_FIELD_VAL, hints_load_cb(), rz_key_parser_add(), rz_key_parser_free(), rz_key_parser_new(), RZ_SERIALIZE_ERR, and sdb_foreach().
Referenced by rz_serialize_analysis_load().
RZ_API void rz_serialize_analysis_hints_save | ( | RZ_NONNULL Sdb * | db, |
RZ_NONNULL RzAnalysis * | analysis | ||
) |
Definition at line 1923 of file serialize_analysis.c.
References addr_hint_acc_cb(), arch_hint_acc_cb(), bits_hint_acc_cb(), hints_acc_store_cb(), hints_at_addr_kv_free(), NULL, rz_analysis_addr_hints_foreach(), rz_analysis_arch_hints_foreach(), and rz_analysis_bits_hints_foreach().
Referenced by rz_serialize_analysis_save().
RZ_API bool rz_serialize_analysis_imports_load | ( | RZ_NONNULL Sdb * | db, |
RZ_NONNULL RzAnalysis * | analysis, | ||
RZ_NULLABLE RzSerializeResultInfo * | res | ||
) |
Definition at line 2181 of file serialize_analysis.c.
References import_load_cb(), and sdb_foreach().
Referenced by rz_serialize_analysis_load().
RZ_API void rz_serialize_analysis_imports_save | ( | RZ_NONNULL Sdb * | db, |
RZ_NONNULL RzAnalysis * | analysis | ||
) |
Definition at line 2168 of file serialize_analysis.c.
References sdb_set().
Referenced by rz_serialize_analysis_save().
RZ_API bool rz_serialize_analysis_load | ( | RZ_NONNULL Sdb * | db, |
RZ_NONNULL RzAnalysis * | analysis, | ||
RZ_NULLABLE RzSerializeResultInfo * | res | ||
) |
Definition at line 2210 of file serialize_analysis.c.
References rz_analysis_bb_t::ref, rz_analysis_block_unref(), rz_analysis_purge(), rz_pvector_clear(), rz_pvector_init(), rz_pvector_push(), rz_rbtree_foreach, rz_serialize_analysis_blocks_load(), rz_serialize_analysis_callables_load(), rz_serialize_analysis_cc_load(), rz_serialize_analysis_classes_load(), rz_serialize_analysis_diff_parser_free(), rz_serialize_analysis_diff_parser_new(), rz_serialize_analysis_function_noreturn_load(), rz_serialize_analysis_functions_load(), rz_serialize_analysis_global_var_load(), rz_serialize_analysis_hints_load(), rz_serialize_analysis_imports_load(), rz_serialize_analysis_meta_load(), rz_serialize_analysis_typelinks_load(), rz_serialize_analysis_types_load(), rz_serialize_analysis_xrefs_load(), and SUB.
Referenced by rz_serialize_core_load().
RZ_API bool rz_serialize_analysis_meta_load | ( | RZ_NONNULL Sdb * | db, |
RZ_NONNULL RzAnalysis * | analysis, | ||
RZ_NULLABLE RzSerializeResultInfo * | res | ||
) |
Definition at line 1769 of file serialize_analysis.c.
References meta_load_cb(), RZ_SERIALIZE_ERR, rz_serialize_spaces_load(), sdb_foreach(), and sdb_ns().
Referenced by rz_serialize_analysis_load().
RZ_API void rz_serialize_analysis_meta_save | ( | RZ_NONNULL Sdb * | db, |
RZ_NONNULL RzAnalysis * | analysis | ||
) |
Definition at line 1547 of file serialize_analysis.c.
References addr, count, FLUSH, key, rz_space_t::name, pj_a(), pj_end(), pj_free(), pj_ki(), pj_kn(), pj_ks(), pj_new(), pj_o(), pj_reset(), rz_interval_tree_empty(), rz_interval_tree_foreach, rz_interval_tree_iter_get(), RZ_META_TYPE_CODE, RZ_META_TYPE_COMMENT, RZ_META_TYPE_DATA, RZ_META_TYPE_FORMAT, RZ_META_TYPE_HIDE, RZ_META_TYPE_HIGHLIGHT, RZ_META_TYPE_MAGIC, RZ_META_TYPE_STRING, RZ_META_TYPE_VARTYPE, rz_serialize_spaces_save(), sdb_ns(), rz_analysis_meta_item_t::space, rz_interval_node_t::start, rz_analysis_meta_item_t::str, rz_analysis_meta_item_t::subtype, rz_analysis_meta_item_t::type, and ut64().
Referenced by rz_serialize_analysis_save().
RZ_API void rz_serialize_analysis_save | ( | RZ_NONNULL Sdb * | db, |
RZ_NONNULL RzAnalysis * | analysis | ||
) |
Definition at line 2194 of file serialize_analysis.c.
References rz_serialize_analysis_blocks_save(), rz_serialize_analysis_callables_save(), rz_serialize_analysis_cc_save(), rz_serialize_analysis_classes_save(), rz_serialize_analysis_function_noreturn_save(), rz_serialize_analysis_functions_save(), rz_serialize_analysis_global_var_save(), rz_serialize_analysis_hints_save(), rz_serialize_analysis_imports_save(), rz_serialize_analysis_meta_save(), rz_serialize_analysis_typelinks_save(), rz_serialize_analysis_types_save(), rz_serialize_analysis_xrefs_save(), and sdb_ns().
Referenced by rz_serialize_core_save().
RZ_API RzAnalysisSwitchOp* rz_serialize_analysis_switch_op_load | ( | RZ_NONNULL const RzJson * | json | ) |
Definition at line 190 of file serialize_analysis.c.
References addr, rz_json_t::children, jump(), rz_json_t::key, rz_json_t::next, NULL, rz_json_t::num, rz_analysis_switch_op_add_case(), rz_analysis_switch_op_new(), RZ_JSON_ARRAY, RZ_JSON_INTEGER, RZ_JSON_OBJECT, rz_json_t::type, ut64(), UT64_MAX, and value.
RZ_API void rz_serialize_analysis_switch_op_save | ( | RZ_NONNULL PJ * | j, |
RZ_NONNULL RzAnalysisSwitchOp * | op | ||
) |
Definition at line 173 of file serialize_analysis.c.
References pj_a(), pj_end(), pj_k(), pj_kn(), pj_o(), and rz_serialize_analysis_case_op_save().
Referenced by block_store().
RZ_API bool rz_serialize_analysis_typelinks_load | ( | RZ_NONNULL Sdb * | db, |
RZ_NONNULL RzAnalysis * | analysis, | ||
RZ_NULLABLE RzSerializeResultInfo * | res | ||
) |
Definition at line 2164 of file serialize_analysis.c.
References rz_serialize_typelinks_load().
Referenced by rz_serialize_analysis_load().
RZ_API void rz_serialize_analysis_typelinks_save | ( | RZ_NONNULL Sdb * | db, |
RZ_NONNULL RzAnalysis * | analysis | ||
) |
Definition at line 2160 of file serialize_analysis.c.
References rz_serialize_typelinks_save().
Referenced by rz_serialize_analysis_save().
RZ_API bool rz_serialize_analysis_types_load | ( | RZ_NONNULL Sdb * | db, |
RZ_NONNULL RzAnalysis * | analysis, | ||
RZ_NULLABLE RzSerializeResultInfo * | res | ||
) |
Definition at line 2148 of file serialize_analysis.c.
References rz_serialize_types_load().
Referenced by rz_serialize_analysis_load().
RZ_API void rz_serialize_analysis_types_save | ( | RZ_NONNULL Sdb * | db, |
RZ_NONNULL RzAnalysis * | analysis | ||
) |
Definition at line 2144 of file serialize_analysis.c.
References rz_serialize_types_save().
Referenced by rz_serialize_analysis_save().
RZ_API RZ_NULLABLE RzAnalysisVar* rz_serialize_analysis_var_load | ( | RZ_NONNULL RzAnalysisFunction * | fcn, |
RZ_NONNULL RzSerializeAnalVarParser | parser, | ||
RZ_NONNULL const RzJson * | json | ||
) |
Definition at line 667 of file serialize_analysis.c.
References rz_json_t::children, delta, if(), rz_json_t::next, NULL, rz_analysis_var_access_t::offset, cmd_descs_generate::parser, rz_analysis_var_access_t::reg, regname(), RZ_ANALYSIS_VAR_ACCESS_TYPE_READ, RZ_ANALYSIS_VAR_ACCESS_TYPE_WRITE, RZ_JSON_BOOLEAN, rz_json_get(), RZ_JSON_INTEGER, RZ_JSON_OBJECT, RZ_JSON_STRING, RZ_KEY_PARSER_JSON, rz_vector_init(), rz_vector_push(), st64, ST64_MAX, rz_analysis_var_access_t::stackptr, rz_json_t::str_value, type, rz_analysis_var_access_t::type, ut64(), VAR_FIELD_ACCS, VAR_FIELD_ARG, VAR_FIELD_COMMENT, VAR_FIELD_DELTA, VAR_FIELD_KIND, VAR_FIELD_NAME, VAR_FIELD_REG, and VAR_FIELD_TYPE.
RZ_API void rz_serialize_analysis_var_parser_free | ( | RzSerializeAnalVarParser | parser | ) |
Definition at line 663 of file serialize_analysis.c.
References cmd_descs_generate::parser, and rz_key_parser_free().
Referenced by rz_serialize_analysis_functions_load().
RZ_API RzSerializeAnalVarParser rz_serialize_analysis_var_parser_new | ( | void | ) |
Definition at line 646 of file serialize_analysis.c.
References NULL, cmd_descs_generate::parser, rz_key_parser_add(), rz_key_parser_new(), VAR_FIELD_ACCS, VAR_FIELD_ARG, VAR_FIELD_COMMENT, VAR_FIELD_CONSTRS, VAR_FIELD_DELTA, VAR_FIELD_KIND, VAR_FIELD_NAME, VAR_FIELD_REG, and VAR_FIELD_TYPE.
Referenced by rz_serialize_analysis_functions_load().
RZ_API void rz_serialize_analysis_var_save | ( | RZ_NONNULL PJ * | j, |
RZ_NONNULL RzAnalysisVar * | var | ||
) |
Definition at line 558 of file serialize_analysis.c.
References rz_type_constraint_t::cond, free(), rz_analysis_var_access_t::offset, pj_end(), pj_i(), pj_ka(), pj_kb(), pj_kN(), pj_kn(), pj_ks(), pj_n(), pj_o(), rz_analysis_var_access_t::reg, RZ_ANALYSIS_VAR_ACCESS_TYPE_READ, RZ_ANALYSIS_VAR_ACCESS_TYPE_WRITE, RZ_ANALYSIS_VAR_KIND_BPV, RZ_ANALYSIS_VAR_KIND_REG, RZ_ANALYSIS_VAR_KIND_SPV, RZ_LOG_ERROR, rz_return_if_fail, rz_type_as_string(), rz_vector_empty(), rz_vector_foreach, rz_warn_if_reached, rz_analysis_var_access_t::stackptr, rz_analysis_var_access_t::type, and rz_type_constraint_t::val.
Referenced by function_store().
RZ_API bool rz_serialize_analysis_xrefs_load | ( | RZ_NONNULL Sdb * | db, |
RZ_NONNULL RzAnalysis * | analysis, | ||
RZ_NULLABLE RzSerializeResultInfo * | res | ||
) |
Definition at line 1539 of file serialize_analysis.c.
References RZ_SERIALIZE_ERR, sdb_foreach(), and xrefs_load_cb().
Referenced by rz_serialize_analysis_load().
RZ_API void rz_serialize_analysis_xrefs_save | ( | RZ_NONNULL Sdb * | db, |
RZ_NONNULL RzAnalysis * | analysis | ||
) |
Definition at line 1473 of file serialize_analysis.c.
References store_xrefs_list_cb().
Referenced by rz_serialize_analysis_save().
Definition at line 1055 of file serialize_analysis.c.
Referenced by function_store().
Definition at line 1443 of file serialize_analysis.c.
References k, pj_end(), pj_kn(), pj_ks(), pj_o(), RZ_ANALYSIS_XREF_TYPE_NULL, type, rz_analysis_ref_t::type, and v.
Referenced by store_xrefs_list_cb().
Definition at line 1455 of file serialize_analysis.c.
References k, key, PFMT64x, pj_a(), pj_end(), pj_free(), pj_new(), pj_string(), sdb_set(), snprintf, store_xref_cb(), and v.
Referenced by rz_serialize_analysis_xrefs_save().
Definition at line 1477 of file serialize_analysis.c.
References rz_json_t::children, error(), free(), from, k, rz_json_t::next, NULL, rz_json_t::num, RZ_ANALYSIS_XREF_TYPE_CALL, RZ_ANALYSIS_XREF_TYPE_CODE, RZ_ANALYSIS_XREF_TYPE_DATA, RZ_ANALYSIS_XREF_TYPE_NULL, RZ_ANALYSIS_XREF_TYPE_STRING, rz_analysis_xrefs_set(), RZ_JSON_ARRAY, rz_json_free(), rz_json_get(), RZ_JSON_INTEGER, RZ_JSON_OBJECT, rz_json_parse(), RZ_JSON_STRING, rz_json_t::str_value, strdup(), to, type, rz_json_t::type, ut64(), and v.
Referenced by rz_serialize_analysis_xrefs_load().