Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Classes | |
struct | fcn_tree_iter_t |
struct | leaddr_pair |
struct | BlockTakeoverCtx |
struct | BlockRecurseCtx |
Macros | |
#define | READ_AHEAD 1 |
#define | SDB_KEY_BB "bb.0x%" PFMT64x ".0x%" PFMT64x |
#define | JMPTBL_LEA_SEARCH_SZ 64 |
#define | BB_ALIGN 0x10 |
#define | MAX_SCAN_SIZE 0x7ffffff |
#define | MAX_FLG_NAME_SIZE 64 |
#define | MAX_FCN_SIZE (1024 * 256) |
#define | DB a->sdb_fcns |
#define | EXISTS(x, ...) snprintf(key, sizeof(key) - 1, x, ##__VA_ARGS__), sdb_exists(DB, key) |
#define | SETKEY(x, ...) snprintf(key, sizeof(key) - 1, x, ##__VA_ARGS__); |
#define | gotoBeach(x) |
Typedefs | |
typedef struct fcn_tree_iter_t | FcnTreeIter |
Variables | |
static ut64 | cache_addr = UT64_MAX |
#define gotoBeach | ( | x | ) |
typedef struct fcn_tree_iter_t FcnTreeIter |
|
static |
Definition at line 2165 of file fcn.c.
References rz_analysis_bb_t::addr, rz_analysis_function_t::bbs, rz_analysis_function_t::bp_frame, can_affect_bp(), test_evm::end, free(), setup::idx, rz_io_bind_t::io, rz_analysis_t::iob, malloc(), rz_reg_t::name, NULL, op, pos, rz_io_bind_t::read_at, rz_analysis_t::reg, rz_analysis_op(), rz_analysis_op_fini(), RZ_ANALYSIS_OP_MASK_OPEX, RZ_ANALYSIS_OP_MASK_VAL, RZ_ANALYSIS_OP_TYPE_ADD, RZ_ANALYSIS_OP_TYPE_AND, RZ_ANALYSIS_OP_TYPE_CMOV, RZ_ANALYSIS_OP_TYPE_LEA, RZ_ANALYSIS_OP_TYPE_MOV, RZ_ANALYSIS_OP_TYPE_NOT, RZ_ANALYSIS_OP_TYPE_OR, RZ_ANALYSIS_OP_TYPE_POP, RZ_ANALYSIS_OP_TYPE_ROL, RZ_ANALYSIS_OP_TYPE_ROR, RZ_ANALYSIS_OP_TYPE_SAL, RZ_ANALYSIS_OP_TYPE_SAR, RZ_ANALYSIS_OP_TYPE_SHL, RZ_ANALYSIS_OP_TYPE_SHR, RZ_ANALYSIS_OP_TYPE_SUB, RZ_ANALYSIS_OP_TYPE_XCHG, RZ_ANALYSIS_OP_TYPE_XOR, RZ_REG_NAME_BP, RZ_REG_NAME_SP, rz_analysis_bb_t::size, and ut64().
Referenced by rz_analysis_function_check_bp_use().
Definition at line 2257 of file fcn.c.
References addr, analyze_function_locally(), mark_as_visited(), NULL, rz_analysis_block_recurse(), rz_analysis_get_block_at(), rz_list_contains(), and rz_list_length().
Referenced by analize_descendents().
|
static |
Definition at line 2272 of file fcn.c.
References analize_addr_cb(), and rz_analysis_block_successor_addrs_foreach().
Referenced by update_analysis().
|
static |
Definition at line 529 of file fcn.c.
References NULL, RZ_ANALYSIS_RET_ERROR, rz_analysis_run_tasks(), rz_return_val_if_fail, rz_vector_fini(), rz_vector_init(), rz_vector_push(), and rz_analysis_function_t::stack.
Referenced by analize_addr_cb(), run_basic_block_analysis(), and update_analysis().
|
static |
Definition at line 506 of file fcn.c.
References rz_analysis_t::opt, rz_analysis_options_t::retpoline, retpoline_reg(), and RZ_ANALYSIS_OP_TYPE_RJMP.
Referenced by run_basic_block_analysis().
|
static |
Definition at line 359 of file fcn.c.
References addr, rz_analysis_bb_t::addr, rz_analysis_options_t::delay, free(), i, rz_io_bind_t::io, rz_analysis_t::iob, malloc(), rz_analysis_bb_t::ninstr, NULL, off, op, rz_analysis_t::opt, rz_io_bind_t::read_at, rz_analysis_block_get_op_offset(), rz_analysis_block_op_starts_at(), rz_analysis_get_blocks_in(), rz_analysis_op(), rz_analysis_op_fini(), RZ_ANALYSIS_OP_MASK_BASIC, rz_list_free(), rz_analysis_bb_t::size, and ut64().
Referenced by run_basic_block_analysis().
|
static |
Definition at line 2381 of file fcn.c.
References rz_analysis_function_t::addr, rz_analysis_bb_t::addr, rz_analysis_function_t::analysis, clear_bb_vars(), mark_as_visited(), rz_analysis_function_t::ninstr, rz_analysis_bb_t::ninstr, rz_analysis_block_recurse(), rz_analysis_function_remove_block(), rz_analysis_get_block_at(), rz_list_append(), rz_list_contains(), and rz_analysis_bb_t::size.
Referenced by rz_analysis_function_update_analysis(), and rz_analysis_update_analysis_range().
|
static |
Definition at line 2147 of file fcn.c.
References dst, rz_reg_t::name, NULL, rz_analysis_t::reg, RZ_ANALYSIS_OP_TYPE_XCHG, RZ_REG_NAME_BP, and src.
Referenced by __analysis_fcn_check_bp_use().
|
static |
Definition at line 319 of file fcn.c.
References rz_analysis_function_t::addr, rz_analysis_function_t::analysis, rz_analysis_function_t::is_pure, NULL, purity_checked(), rz_analysis_function_get_xrefs_from(), rz_analysis_get_fcn_in(), RZ_ANALYSIS_XREF_TYPE_CALL, RZ_ANALYSIS_XREF_TYPE_CODE, RZ_ANALYSIS_XREF_TYPE_DATA, rz_list_free(), rz_analysis_ref_t::to, and rz_analysis_ref_t::type.
Referenced by rz_analysis_function_purity().
|
static |
Definition at line 2312 of file fcn.c.
References addr, from, i, rz_analysis_bb_t::ninstr, rz_analysis_block_get_op_addr(), rz_analysis_function_get_vars_used_at(), rz_analysis_var_remove_access_at(), rz_pvector_clear(), rz_pvector_empty(), rz_pvector_foreach, rz_vector_clone(), to, ut64(), UT64_MAX, v, and rz_analysis_function_t::vars.
Referenced by calc_reachable_and_remove_block(), and rz_analysis_update_analysis_range().
|
static |
Definition at line 128 of file fcn.c.
References addr, NULL, rz_analysis_bb_t::parent_stackptr, rz_analysis_create_block(), rz_analysis_function_add_block(), rz_analysis_function_t::stack, and rz_analysis_bb_t::stackptr.
Referenced by run_basic_block_analysis().
|
static |
Definition at line 474 of file fcn.c.
References fcn_takeover_block_recursive_followthrough_cb(), rz_analysis_bb_t::parent_stackptr, rz_analysis_block_recurse_followthrough(), and rz_analysis_function_t::stack.
Referenced by run_basic_block_analysis().
|
static |
Definition at line 412 of file fcn.c.
References rz_analysis_var_t::accesses, addr, rz_analysis_function_t::addr, rz_analysis_bb_t::addr, rz_analysis_function_t::bp_off, rz_analysis_var_t::delta, rz_analysis_bb_t::fcns, i, rz_analysis_var_t::isarg, rz_analysis_var_t::kind, rz_analysis_var_t::name, rz_analysis_bb_t::ninstr, rz_analysis_bb_t::parent_stackptr, rz_analysis_var_access_t::reg, rz_analysis_block_get_op_addr(), rz_analysis_block_ref(), rz_analysis_block_unref(), rz_analysis_function_add_block(), rz_analysis_function_delete_var(), rz_analysis_function_get_var(), rz_analysis_function_get_vars_used_at(), rz_analysis_function_remove_block(), rz_analysis_function_set_var(), rz_analysis_var_get_access_at(), RZ_ANALYSIS_VAR_KIND_BPV, RZ_ANALYSIS_VAR_KIND_REG, RZ_ANALYSIS_VAR_KIND_SPV, rz_analysis_var_remove_access_at(), rz_analysis_var_set_access(), rz_list_first(), rz_pvector_foreach, rz_pvector_free(), rz_vector_clone(), rz_vector_empty(), rz_analysis_var_access_t::stackptr, rz_analysis_bb_t::stackptr, rz_analysis_var_access_t::type, rz_analysis_var_t::type, and ut64().
Referenced by fcn_takeover_block_recursive().
|
static |
Definition at line 2276 of file fcn.c.
Referenced by rz_analysis_function_update_analysis(), and rz_analysis_update_analysis_range().
|
static |
Definition at line 353 of file fcn.c.
References free(), and leaddr_pair::reg.
Referenced by run_basic_block_analysis().
|
static |
Definition at line 166 of file fcn.c.
References addr, rz_analysis_op_t::addr, rz_analysis_op_t::disp, rz_analysis_op_t::dst, dst, i, rz_io_bind_t::io, rz_analysis_t::iob, rz_io_bind_t::is_valid_offset, isValid(), rz_analysis_options_t::jmpabove, JMPTBL_LEA_SEARCH_SZ, rz_analysis_options_t::jmptbl_maxoffset, len, NULL, rz_reg_item_t::offset, rz_analysis_t::opt, PFMT64x, rz_analysis_op_t::ptr, read_ahead(), rz_analysis_value_t::reg, rz_analysis_value_t::regdelta, rz_analysis_op(), rz_analysis_op_fini(), RZ_ANALYSIS_OP_MASK_BASIC, RZ_ANALYSIS_OP_MASK_HINT, RZ_ANALYSIS_OP_MASK_VAL, RZ_ANALYSIS_OP_TYPE_ADD, RZ_ANALYSIS_OP_TYPE_CJMP, RZ_ANALYSIS_OP_TYPE_JMP, RZ_ANALYSIS_OP_TYPE_MOV, RZ_ANALYSIS_OP_TYPE_RJMP, RZ_ANALYSIS_OP_TYPE_UJMP, RZ_LOG_VERBOSE, rz_read_le32(), rz_analysis_op_t::src, st32, rz_analysis_op_t::type, ut64(), UT64_ADD_OVFCHK, UT64_MAX, and UT64_SUB_OVFCHK.
Referenced by run_basic_block_analysis().
|
static |
Definition at line 143 of file fcn.c.
References count, i, len, rz_analysis_options_t::nonull, rz_analysis_t::opt, and RZ_MIN.
Referenced by run_basic_block_analysis().
|
static |
Definition at line 159 of file fcn.c.
References rz_flag_bind_t::f, rz_analysis_t::flb, rz_flag_bind_t::get_at, rz_flag_item_t::name, and rz_return_val_if_fail.
Referenced by run_basic_block_analysis().
|
static |
Definition at line 2251 of file fcn.c.
References rz_analysis_bb_t::addr, and NULL.
Referenced by analize_addr_cb(), and calc_reachable_and_remove_block().
|
inlinestatic |
|
static |
Definition at line 306 of file fcn.c.
References rz_analysis_function_t::addr.
Referenced by check_purity().
|
static |
Definition at line 52 of file fcn.c.
References a, addr, cache_addr, rz_io_bind_t::io, rz_analysis_t::iob, len, memcpy(), rz_io_bind_t::read_at, ut64(), UT64_ADD_OVFCHK, and UT64_MAX.
Referenced by is_delta_pointer_table(), and run_basic_block_analysis().
|
static |
Definition at line 282 of file fcn.c.
References dst, rz_return_val_if_fail, and src.
Referenced by run_basic_block_analysis().
|
static |
Definition at line 479 of file fcn.c.
References addr, c3, call(), rz_flag_bind_t::f, rz_analysis_t::flag_get, rz_analysis_t::flb, jmp, mov(), rz_flag_item_t::name, NULL, pid, and rax.
Referenced by analyze_retpoline().
|
static |
Analyses the given task item item
for branches.
Analysis starts for all instructions from item->start_address
. If a branch is encountered a new task item is added to the list tasks
. If an end of a basic function block is encountered (e.g. an invalid instruction), the cause for it is returned.
item | The task item with the parent function and start address to start analysing from. |
tasks | The task list to append the new task items to. |
Definition at line 559 of file fcn.c.
References addr, rz_analysis_function_t::addr, rz_analysis_op_t::addr, rz_analysis_bb_t::addr, rz_io_t::addrbytes, after(), rz_analysis_options_t::afterjmp, rz_analysis_options_t::aftertrap, rz_analysis_function_t::analysis, analyze_function_locally(), analyze_retpoline(), rz_analysis_plugin_t::arch, arch_destroys_dst(), rz_analysis_options_t::bb_max_size, bbget(), rz_analysis_t::bits, rz_analysis_task_item::block, rz_analysis_function_t::bp_off, rz_analysis_function_t::cc, rz_analysis_options_t::cjmpref, rz_analysis_bb_t::cmpreg, rz_analysis_bb_t::cmpval, rz_analysis_bb_t::cond, rz_core_bind_t::core, rz_analysis_t::coreb, rz_analysis_t::cur, rz_analysis_options_t::delay, rz_analysis_op_t::disp, does_arch_destroys_dst(), rz_analysis_op_t::dst, rz_flag_bind_t::f, f, rz_analysis_bb_t::fail, rz_analysis_task_item::fcn, fcn_append_basic_block(), fcn_takeover_block_recursive(), rz_analysis_bb_t::fcns, rz_analysis_t::flb, free(), free_leaddr_pair(), rz_flag_bind_t::get_at, rz_core_bind_t::getName, gotoBeach, handle, rz_analysis_options_t::hpskip, setup::idx, if(), rz_analysis_options_t::ijmp, rz_io_bind_t::io, rz_analysis_t::iob, is_arm(), is_delta_pointer_table(), rz_io_bind_t::is_valid_offset, rz_analysis_function_t::is_variadic, isInvalidMemory(), isSymbolNextInstruction(), rz_analysis_options_t::jmpabove, rz_analysis_options_t::jmpmid, rz_analysis_options_t::jmpref, rz_analysis_options_t::jmptbl, rz_analysis_options_t::jmptbl_maxcount, rz_analysis_bb_t::jump, leaddr_pair::leaddr, rz_analysis_t::leaddrs, len, rz_analysis_t::limit, limit, list(), rz_analysis_options_t::loads, map(), rz_io_bind_t::map_get, MAX_FCN_SIZE, MAX_FLG_NAME_SIZE, MAX_SCAN_SIZE, maxlen, rz_analysis_function_t::maxstack, rz_analysis_function_t::name, rz_flag_item_t::name, rz_reg_item_t::name, rz_reg_t::name, rz_analysis_function_t::ninstr, rz_analysis_bb_t::ninstr, rz_analysis_options_t::nopskip, NULL, rz_core_bind_t::numGet, rz_reg_item_t::offset, leaddr_pair::op_addr, op_is_set_bp(), rz_analysis_t::opt, PFMT64u, PFMT64x, rz_analysis_options_t::pushret, read_ahead(), rz_io_bind_t::read_at, rz_analysis_options_t::recont, leaddr_pair::reg, rz_analysis_t::reg, rz_analysis_value_t::reg, regs_exist(), repeat(), RZ_ABS, rz_analysis_block_relocate(), rz_analysis_block_set_op_offset(), rz_analysis_block_set_size(), rz_analysis_block_split(), rz_analysis_block_unref(), rz_analysis_block_update_hash(), rz_analysis_cond_free(), rz_analysis_cond_new_from_op(), rz_analysis_extract_vars(), RZ_ANALYSIS_FCN_TYPE_INT, rz_analysis_function_linear_size(), rz_analysis_function_remove_block(), rz_analysis_get_delta_jmptbl_info(), rz_analysis_get_fcn_in(), rz_analysis_get_function_at(), rz_analysis_get_jmptbl_info(), rz_analysis_hint_set_bits(), rz_analysis_is_prelude(), rz_analysis_noreturn_at(), rz_analysis_op(), RZ_ANALYSIS_OP_FAMILY_PRIV, rz_analysis_op_fini(), RZ_ANALYSIS_OP_MASK_ESIL, RZ_ANALYSIS_OP_MASK_HINT, RZ_ANALYSIS_OP_MASK_VAL, RZ_ANALYSIS_OP_PREFIX_HWLOOP_END, RZ_ANALYSIS_OP_TYPE_ACMP, RZ_ANALYSIS_OP_TYPE_ADD, RZ_ANALYSIS_OP_TYPE_CALL, RZ_ANALYSIS_OP_TYPE_CCALL, RZ_ANALYSIS_OP_TYPE_CJMP, RZ_ANALYSIS_OP_TYPE_CMOV, RZ_ANALYSIS_OP_TYPE_CMP, RZ_ANALYSIS_OP_TYPE_CRET, RZ_ANALYSIS_OP_TYPE_ICALL, RZ_ANALYSIS_OP_TYPE_IJMP, RZ_ANALYSIS_OP_TYPE_ILL, RZ_ANALYSIS_OP_TYPE_IRCALL, RZ_ANALYSIS_OP_TYPE_IRJMP, RZ_ANALYSIS_OP_TYPE_JMP, RZ_ANALYSIS_OP_TYPE_LEA, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_ANALYSIS_OP_TYPE_MASK, RZ_ANALYSIS_OP_TYPE_MCJMP, RZ_ANALYSIS_OP_TYPE_MJMP, RZ_ANALYSIS_OP_TYPE_MOV, RZ_ANALYSIS_OP_TYPE_NOP, RZ_ANALYSIS_OP_TYPE_PUSH, RZ_ANALYSIS_OP_TYPE_RCALL, RZ_ANALYSIS_OP_TYPE_RCJMP, RZ_ANALYSIS_OP_TYPE_REG, RZ_ANALYSIS_OP_TYPE_RET, RZ_ANALYSIS_OP_TYPE_RJMP, RZ_ANALYSIS_OP_TYPE_RPUSH, RZ_ANALYSIS_OP_TYPE_SUB, RZ_ANALYSIS_OP_TYPE_TRAP, RZ_ANALYSIS_OP_TYPE_UCALL, RZ_ANALYSIS_OP_TYPE_UCJMP, RZ_ANALYSIS_OP_TYPE_UJMP, RZ_ANALYSIS_OP_TYPE_UPUSH, RZ_ANALYSIS_RET_BRANCH, RZ_ANALYSIS_RET_COND, RZ_ANALYSIS_RET_END, RZ_ANALYSIS_RET_ERROR, RZ_ANALYSIS_RET_NOP, RZ_ANALYSIS_STACK_INC, RZ_ANALYSIS_STACK_RESET, rz_analysis_task_item_new(), rz_analysis_var_all_list(), rz_analysis_walkthrough_arm_jmptbl_style(), rz_analysis_walkthrough_casetbl(), rz_analysis_walkthrough_jmptbl(), RZ_ANALYSIS_XREF_TYPE_CALL, RZ_ANALYSIS_XREF_TYPE_CODE, RZ_ANALYSIS_XREF_TYPE_DATA, rz_analysis_xrefs_set(), rz_cons_is_breaked(), RZ_FREE, rz_list_append(), rz_list_contains(), rz_list_free(), rz_list_newf(), RZ_LOG_DEBUG, RZ_LOG_ERROR, rz_meta_set(), RZ_META_TYPE_DATA, RZ_MIN, RZ_NEW, rz_reg_get(), RZ_REG_NAME_BP, RZ_REG_NAME_SP, RZ_REG_TYPE_GPR, rz_return_val_if_fail, rz_str_bool(), rz_str_cmp(), rz_str_endswith(), rz_str_replace(), rz_str_startswith(), rz_strbuf_get(), rz_sys_usleep(), RZ_TYPE_COND_EXCEPTION, set_bb_branches(), rz_analysis_bb_t::size, skip_hp(), rz_analysis_t::sleep, rz_analysis_function_t::stack, rz_analysis_task_item::stack, rz_analysis_bb_t::stackptr, rz_analysis_task_item::start_address, strdup(), rz_analysis_options_t::tailcall, rz_analysis_range_t::to, try_get_cmpval_from_parents(), rz_analysis_options_t::trycatch, rz_analysis_function_t::type, rz_analysis_op_t::type, rz_analysis_cond_t::type, UT32_MAX, ut64(), UT64_MAX, rz_io_t::va, val, and rz_analysis_options_t::vars.
Referenced by rz_analysis_run_tasks().
RZ_API bool rz_analysis_check_fcn | ( | RzAnalysis * | analysis, |
ut8 * | buf, | ||
ut16 | bufsz, | ||
ut64 | addr, | ||
ut64 | low, | ||
ut64 | high | ||
) |
Definition at line 1538 of file fcn.c.
References addr, i, rz_analysis_is_prelude(), rz_analysis_op(), rz_analysis_op_fini(), RZ_ANALYSIS_OP_MASK_BASIC, RZ_ANALYSIS_OP_MASK_HINT, RZ_ANALYSIS_OP_TYPE_CALL, RZ_ANALYSIS_OP_TYPE_CJMP, RZ_ANALYSIS_OP_TYPE_CMOV, RZ_ANALYSIS_OP_TYPE_JMP, RZ_ANALYSIS_OP_TYPE_MOV, RZ_ANALYSIS_OP_TYPE_PUSH, RZ_ANALYSIS_OP_TYPE_RPUSH, RZ_ANALYSIS_OP_TYPE_UNK, and RZ_ANALYSIS_OP_TYPE_UPUSH.
Referenced by rz_analysis_try_get_fcn().
RZ_API void rz_analysis_del_jmprefs | ( | RzAnalysis * | analysis, |
RzAnalysisFunction * | fcn | ||
) |
Definition at line 1592 of file fcn.c.
References rz_analysis_ref_t::from, rz_analysis_function_get_xrefs_from(), RZ_ANALYSIS_XREF_TYPE_CODE, rz_analysis_xrefs_deln(), rz_list_free(), rz_analysis_ref_t::to, and rz_analysis_ref_t::type.
Referenced by rz_analysis_function_del_all_handler().
RZ_API int rz_analysis_fcn | ( | RzAnalysis * | analysis, |
RzAnalysisFunction * | fcn, | ||
ut64 | addr, | ||
ut64 | len, | ||
int | reftype | ||
) |
Definition at line 1606 of file fcn.c.
References addr, rz_analysis_function_t::addr, rz_analysis_function_t::cc, rz_analysis_function_t::maxstack, metas, rz_analysis_options_t::norevisit, NULL, rz_analysis_t::opt, PFMT64x, rz_analysis_function_t::reg_save_area, RZ_ANALYSIS_FCN_TYPE_FCN, RZ_ANALYSIS_FCN_TYPE_LOC, RZ_ANALYSIS_RET_END, rz_analysis_run_tasks(), rz_analysis_task_item_new(), RZ_ANALYSIS_XREF_TYPE_CODE, RZ_LOG_DEBUG, rz_meta_get_all_in(), RZ_META_TYPE_ANY, RZ_META_TYPE_DATA, RZ_META_TYPE_FORMAT, RZ_META_TYPE_STRING, rz_pvector_foreach, rz_pvector_free(), rz_vector_fini(), rz_vector_init(), set_u_add(), set_u_contains(), set_u_free(), set_u_new(), rz_analysis_function_t::stack, rz_analysis_function_t::type, rz_analysis_meta_item_t::type, UT64_MAX, and rz_analysis_t::visited.
Referenced by __core_analysis_fcn().
RZ_API bool rz_analysis_fcn_add_bb | ( | RzAnalysis * | a, |
RzAnalysisFunction * | fcn, | ||
ut64 | addr, | ||
ut64 | size, | ||
ut64 | jump, | ||
ut64 | fail, | ||
RZ_BORROW RzAnalysisDiff * | diff | ||
) |
Definition at line 1739 of file fcn.c.
References a, addr, rz_analysis_diff_t::addr, rz_analysis_bb_t::diff, rz_analysis_bb_t::fail, fail, rz_analysis_bb_t::jump, jump(), rz_analysis_diff_t::name, NULL, PFMT64d, PFMT64x, rz_analysis_block_analyze_ops(), rz_analysis_block_unref(), rz_analysis_create_block(), rz_analysis_delete_block(), rz_analysis_diff_new(), rz_analysis_function_add_block(), rz_analysis_get_block_at(), RZ_FREE, RZ_LOG_ERROR, rz_warn_if_reached, st64, strdup(), and rz_analysis_diff_t::type.
Referenced by rz_analysis_function_blocks_add_handler().
RZ_API RzAnalysisBlock* rz_analysis_fcn_bbget_at | ( | RzAnalysis * | analysis, |
RzAnalysisFunction * | fcn, | ||
ut64 | addr | ||
) |
Definition at line 2063 of file fcn.c.
References addr, rz_analysis_bb_t::addr, b, rz_analysis_function_t::bbs, NULL, rz_analysis_get_block_at(), rz_return_val_if_fail, and UT64_MAX.
Referenced by ds_print_bbline().
RZ_API RzAnalysisBlock* rz_analysis_fcn_bbget_in | ( | const RzAnalysis * | analysis, |
RzAnalysisFunction * | fcn, | ||
ut64 | addr | ||
) |
Definition at line 2042 of file fcn.c.
References addr, rz_analysis_bb_t::addr, rz_analysis_plugin_t::arch, rz_analysis_function_t::bbs, rz_analysis_t::cur, rz_analysis_options_t::jmpmid, NULL, rz_analysis_t::opt, rz_analysis_block_op_starts_at(), rz_return_val_if_fail, rz_analysis_bb_t::size, and UT64_MAX.
Referenced by handleMidBB(), propagate_types_among_used_variables(), and rz_core_print_disasm().
RZ_API int rz_analysis_fcn_count | ( | RzAnalysis * | analysis, |
ut64 | from, | ||
ut64 | to | ||
) |
Definition at line 2028 of file fcn.c.
References rz_analysis_function_t::addr, rz_analysis_t::fcns, from, n, and to.
RZ_API int rz_analysis_fcn_del | ( | RzAnalysis * | a, |
ut64 | addr | ||
) |
Definition at line 1675 of file fcn.c.
References a, addr, rz_analysis_function_t::addr, PFMT64x, rz_analysis_function_delete(), and RZ_LOG_DEBUG.
Referenced by rz_analysis_fcn_del_locs(), rz_analysis_function_del_handler(), rz_core_analysis_undefine(), and rz_core_visual_analysis().
RZ_API int rz_analysis_fcn_del_locs | ( | RzAnalysis * | analysis, |
ut64 | addr | ||
) |
Definition at line 1657 of file fcn.c.
References addr, f, rz_analysis_t::fcns, rz_analysis_fcn_del(), RZ_ANALYSIS_FCN_TYPE_LOC, RZ_ANALYSIS_FCN_TYPE_ROOT, rz_analysis_function_contains(), rz_analysis_function_delete(), rz_analysis_get_fcn_in(), and rz_analysis_function_t::type.
Referenced by rz_analysis_function_del_handler(), rz_core_analysis_undefine(), and rz_core_visual_analysis().
RZ_API void rz_analysis_fcn_invalidate_read_ahead_cache | ( | void | ) |
Definition at line 84 of file fcn.c.
References cache_addr, and UT64_MAX.
Referenced by __core_analysis_fcn(), and update_analysis().
RZ_API RzAnalysisFunction* rz_analysis_fcn_next | ( | RzAnalysis * | analysis, |
ut64 | addr | ||
) |
Definition at line 2015 of file fcn.c.
References addr, rz_analysis_function_t::addr, rz_analysis_t::fcns, and NULL.
Definition at line 35 of file fcn.c.
References RZ_ANALYSIS_FCN_TYPE_FCN, RZ_ANALYSIS_FCN_TYPE_IMP, RZ_ANALYSIS_FCN_TYPE_INT, RZ_ANALYSIS_FCN_TYPE_LOC, RZ_ANALYSIS_FCN_TYPE_NULL, RZ_ANALYSIS_FCN_TYPE_ROOT, RZ_ANALYSIS_FCN_TYPE_SYM, and type.
Referenced by __core_analysis_fcn(), core_analysis_graph_nodes(), draw_graph_nodes(), fcn_print_info(), function_print_to_json(), and function_rename().
RZ_API size_t rz_analysis_function_arg_count | ( | RzAnalysis * | a, |
RzAnalysisFunction * | fcn | ||
) |
Returns the argument count of a function.
a | RzAnalysis instance |
f | Function |
Definition at line 2460 of file fcn.c.
References a, count, rz_analysis_var_t::isarg, rz_pvector_foreach, and rz_analysis_function_t::vars.
RZ_API RZ_OWN RzPVector* rz_analysis_function_args | ( | RzAnalysis * | a, |
RzAnalysisFunction * | fcn | ||
) |
Returns vector of all function arguments.
a | RzAnalysis instance |
f | Function |
Definition at line 2481 of file fcn.c.
References a, rz_analysis_function_t::argnum, args, cleanup(), rz_analysis_var_t::isarg, rz_analysis_var_t::kind, rz_analysis_function_t::name, rz_analysis_var_t::name, NULL, rz_analysis_var_get_argnum(), RZ_ANALYSIS_VAR_KIND_REG, RZ_LOG_INFO, rz_pvector_foreach, rz_pvector_free(), rz_pvector_insert(), rz_pvector_len(), rz_pvector_new(), rz_pvector_push(), rz_pvector_reserve(), rz_pvector_set(), autogen_x86imm::tmp, and rz_analysis_function_t::vars.
Referenced by rz_analysis_function_derive_args().
RZ_API void rz_analysis_function_check_bp_use | ( | RzAnalysisFunction * | fcn | ) |
Definition at line 2241 of file fcn.c.
References __analysis_fcn_check_bp_use(), rz_analysis_function_t::analysis, and rz_return_if_fail.
Referenced by __core_analysis_fcn().
RZ_API RZ_OWN RzCallable* rz_analysis_function_clone_type | ( | RzAnalysis * | analysis, |
const RzAnalysisFunction * | f | ||
) |
Clones the RzCallable type for the given function.
Searches the types database for the given function and returns a clone of the RzCallable type.
analysis | RzAnalysis instance |
f | Function to update |
Definition at line 2568 of file fcn.c.
References f, free(), NULL, rz_analysis_function_name_guess(), rz_return_val_if_fail, rz_type_callable_clone(), rz_type_func_get(), strdup(), and rz_analysis_t::typedb.
Referenced by rz_analysis_function_derive_type().
RZ_API int rz_analysis_function_complexity | ( | RzAnalysisFunction * | fcn | ) |
Definition at line 1799 of file fcn.c.
References rz_analysis_function_t::addr, rz_analysis_bb_t::addr, rz_analysis_function_t::analysis, rz_analysis_function_t::bbs, rz_analysis_switch_obj_t::cases, E, rz_analysis_bb_t::fail, rz_analysis_bb_t::jump, N, P, PFMT64x, rz_list_length(), RZ_LOG_DEBUG, rz_analysis_bb_t::switch_op, and UT64_MAX.
Referenced by fcn_print_info(), function_list_print_to_table(), and function_print_to_json().
RZ_API ut32 rz_analysis_function_cost | ( | RzAnalysisFunction * | fcn | ) |
Definition at line 2080 of file fcn.c.
References rz_analysis_bb_t::addr, rz_analysis_function_t::analysis, rz_analysis_function_t::bbs, test_evm::end, free(), setup::idx, rz_io_bind_t::io, rz_analysis_t::iob, malloc(), memset(), op, rz_io_bind_t::read_at, rz_analysis_op(), rz_analysis_op_fini(), RZ_ANALYSIS_OP_MASK_BASIC, rz_analysis_bb_t::size, and ut64().
Referenced by fcn_print_info(), function_list_print_to_table(), and function_print_to_json().
RZ_API int rz_analysis_function_count_edges | ( | const RzAnalysisFunction * | fcn, |
RZ_NULLABLE int * | ebbs | ||
) |
Definition at line 2113 of file fcn.c.
References rz_analysis_function_t::bbs, rz_analysis_bb_t::fail, rz_analysis_bb_t::jump, rz_return_val_if_fail, and UT64_MAX.
Referenced by fcn_print_info(), function_list_print_to_table(), and function_print_to_json().
RZ_API RZ_OWN RzCallable* rz_analysis_function_create_type | ( | RzAnalysis * | analysis, |
RzAnalysisFunction * | f | ||
) |
Creates the RzCallable type for the given function.
Creates the RzCallable type for the given function by searching in the types database and returning it.
analysis | RzAnalysis instance |
f | Function to update |
Definition at line 2596 of file fcn.c.
References f, NULL, rz_type_func_new(), and rz_analysis_t::typedb.
Referenced by rz_analysis_function_derive_type().
RZ_API bool rz_analysis_function_derive_args | ( | RzAnalysis * | analysis, |
RzAnalysisFunction * | f, | ||
RzCallable ** | callable | ||
) |
Sets the RzCallable args for the given function.
Gets the given function's arguments (names and types) and if it has none it simply returns. Otherwise, it creates RzCallableArgs and adds them to RzCallable.
analysis | RzAnalysis instance |
f | Function to update |
callable | A function type |
Definition at line 2632 of file fcn.c.
References args, f, rz_analysis_var_t::name, rz_analysis_function_args(), RZ_LOG_ERROR, rz_pvector_empty(), rz_pvector_foreach, rz_pvector_free(), rz_type_callable_arg_add(), rz_type_callable_arg_new(), rz_type_callable_free(), rz_type_clone(), rz_analysis_var_t::type, and rz_analysis_t::typedb.
Referenced by rz_analysis_function_derive_type().
RZ_API void rz_analysis_function_derive_return_type | ( | RzAnalysisFunction * | f, |
RzCallable ** | callable | ||
) |
Sets the RzCallable return type for the given function.
Checks if the given function's return type exists and adds it to RzCallable by cloning it.
analysis | RzAnalysis instance |
f | Function to update |
callable | A function type |
Definition at line 2615 of file fcn.c.
References f, and rz_type_clone().
Referenced by rz_analysis_function_derive_type().
RZ_API RZ_OWN RzCallable* rz_analysis_function_derive_type | ( | RzAnalysis * | analysis, |
RzAnalysisFunction * | f | ||
) |
Derives the RzCallable type for the given function.
Checks if the type is defined already for this function, if yes - it returns pointer to the one stored in the types database. If not - it creates a new RzCallable instance based on the function name, its arguments' names and types.
analysis | RzAnalysis instance |
f | Function to update |
Definition at line 2676 of file fcn.c.
References f, NULL, rz_analysis_function_clone_type(), rz_analysis_function_create_type(), rz_analysis_function_derive_args(), and rz_analysis_function_derive_return_type().
Referenced by function_type_derive(), rz_analysis_function_get_arg_count(), and rz_analysis_function_get_signature().
RZ_API int rz_analysis_function_get_arg_count | ( | RzAnalysis * | analysis, |
RzAnalysisFunction * | f | ||
) |
Gets the RzCallable's arg count for the given function.
Derives the RzCallable type for the given function, saves it if it exists, and returns its arguments count.
analysis | RzAnalysis instance |
f | Function to update |
Definition at line 1845 of file fcn.c.
References rz_callable_at::args, f, rz_analysis_function_derive_type(), rz_pvector_len(), rz_type_func_save(), and rz_analysis_t::typedb.
Referenced by rz_analysis_function_get_json().
RZ_API char* rz_analysis_function_get_json | ( | RzAnalysisFunction * | function | ) |
Definition at line 1855 of file fcn.c.
References a, free(), i, NULL, pj_a(), pj_drain(), pj_end(), pj_k(), pj_kb(), pj_ks(), pj_new(), pj_o(), rz_analysis_function_get_arg_count(), rz_analysis_noreturn_at_addr(), rz_reg_get_name(), rz_reg_get_name_idx(), rz_type_as_string(), rz_type_func_args_name(), rz_type_func_args_type(), rz_type_func_ret(), and sdb_fmt().
Referenced by rz_analysis_function_signature_handler().
RZ_API RZ_OWN char* rz_analysis_function_get_signature | ( | RZ_NONNULL RzAnalysisFunction * | function | ) |
Definition at line 1895 of file fcn.c.
References a, free(), NULL, rz_analysis_function_derive_type(), rz_return_val_if_fail, rz_str_newf(), rz_type_callable_as_string(), rz_type_callable_free(), and signature().
Referenced by ds_show_functions(), rz_analysis_function_signature_handler(), and rz_core_analysis_function_signature_editor().
RZ_API int rz_analysis_function_loops | ( | RzAnalysisFunction * | fcn | ) |
Definition at line 1784 of file fcn.c.
References rz_analysis_bb_t::addr, rz_analysis_function_t::bbs, rz_analysis_bb_t::fail, rz_analysis_bb_t::jump, and UT64_MAX.
Referenced by fcn_print_info(), function_list_print_to_table(), and function_print_to_json().
RZ_API bool rz_analysis_function_purity | ( | RzAnalysisFunction * | fcn | ) |
Definition at line 2136 of file fcn.c.
References check_purity(), rz_analysis_function_t::has_changed, rz_analysis_function_t::is_pure, and NULL.
Referenced by fcn_print_info(), and function_print_to_json().
RZ_API int rz_analysis_function_resize | ( | RzAnalysisFunction * | fcn, |
int | newsize | ||
) |
Definition at line 90 of file fcn.c.
References rz_analysis_function_t::addr, rz_analysis_bb_t::addr, rz_analysis_function_t::analysis, rz_analysis_plugin_t::arch, rz_analysis_function_t::bbs, rz_analysis_t::cur, rz_analysis_bb_t::fail, is_arm(), rz_analysis_bb_t::jump, rz_analysis_block_set_size(), rz_analysis_block_update_hash(), rz_analysis_function_remove_block(), rz_return_val_if_fail, rz_analysis_bb_t::size, ut64(), and UT64_MAX.
Referenced by module_match_buffer(), rz_core_analysis_fcn(), rz_core_analysis_function_add(), rz_core_analysis_function_until(), and rz_core_visual_define().
RZ_API bool rz_analysis_function_set_type | ( | RzAnalysis * | a, |
RZ_NONNULL RzAnalysisFunction * | f, | ||
RZ_NONNULL RzCallable * | callable | ||
) |
Sets the RzCallable type for the given function.
Checks if the type is defined already for this function, if yes - it removes the existing one and sets the one defined by the RzCallable. If there is a mismatch between existing arguments - it overwrites their types and names, removes arguments if necessary.
a | RzAnalysis instance |
f | Function to update |
callable | A function type |
Definition at line 1922 of file fcn.c.
References a, f, free(), rz_analysis_var_t::isarg, arg::name, rz_analysis_var_t::name, rz_analysis_function_delete_all_vars(), rz_analysis_function_delete_var(), rz_analysis_function_set_var(), RZ_ANALYSIS_VAR_KIND_BPV, rz_pvector_empty(), rz_pvector_foreach, rz_pvector_free(), rz_pvector_index_ptr(), rz_pvector_len(), rz_return_val_if_fail, rz_type_clone(), rz_type_db_get_bitsize(), rz_type_free(), rz_vector_clone(), strdup(), and rz_analysis_var_t::type.
Referenced by rz_analysis_function_set_type_str().
RZ_API bool rz_analysis_function_set_type_str | ( | RzAnalysis * | a, |
RZ_NONNULL RzAnalysisFunction * | f, | ||
RZ_NONNULL const char * | sig | ||
) |
Parses the function type and sets it for the given function.
Checks if the type is defined already for this function, if yes - it removes the existing one and parses the one defined in the signature. The function type should be valid C syntax supplied with name, like int *func(char arg0, const int *arg1, float foo[]);
a | RzAnalysis instance |
f | Function to update |
sig | A function type ("signature" or "prototype") |
Definition at line 1985 of file fcn.c.
References a, rz_type_t::callable, f, free(), rz_type_t::kind, NULL, rz_analysis_function_set_type(), RZ_LOG_ERROR, rz_return_val_if_fail, rz_type_func_delete(), rz_type_func_exist(), RZ_TYPE_KIND_CALLABLE, and rz_type_parse_string_declaration_single().
Referenced by rz_core_analysis_function_set_signature().
RZ_API void rz_analysis_function_update_analysis | ( | RzAnalysisFunction * | fcn | ) |
Definition at line 2435 of file fcn.c.
References rz_analysis_function_t::analysis, rz_analysis_function_t::bbs, calc_reachable_and_remove_block(), f, rz_analysis_bb_t::fcns, free_ht_up(), NULL, rz_analysis_block_was_modified(), rz_list_free(), rz_list_new(), rz_return_if_fail, autogen_x86imm::tmp, and update_analysis().
Referenced by check_function_modified().
RZ_DEPRECATE RZ_API RzAnalysisFunction* rz_analysis_get_fcn_in | ( | RzAnalysis * | analysis, |
ut64 | addr, | ||
int | type | ||
) |
Definition at line 1687 of file fcn.c.
References addr, rz_analysis_function_t::addr, list(), NULL, RZ_ANALYSIS_FCN_TYPE_ROOT, rz_analysis_get_functions_in(), rz_list_first(), rz_list_free(), and type.
Referenced by __analysis_esil_function(), __check_func(), __check_func_diff(), __core_analysis_fcn(), __refs(), __xrefs(), _CbInRangeAav(), agraph_refresh(), analBars(), analysis_fcn_data(), analysis_graph_to(), analysis_path_exists(), autocmplt_cmd_arg_fcn_var(), backtrace_vars(), backtrace_x86_32_analysis(), backtrace_x86_64_analysis(), check_purity(), cmd_analysis_esil(), cmd_analysis_graph(), cmd_print_bars(), DEFINE_HANDLE_TS_FCN_AND_SYMBOL(), disasm_strings(), do_ref_search(), ds_show_xrefs(), fcnIn(), get_cgnodes(), getpcfromstack(), getref(), handleMidBB(), is_skippable_addr(), meta_variable_comment_append(), meta_variable_comment_editor(), meta_variable_comment_list(), meta_variable_comment_list_all(), meta_variable_comment_remove(), num_callback(), print_meta_list(), propagate_types_among_used_variables(), run_basic_block_analysis(), rz_analysis_aefa(), rz_analysis_bind(), rz_analysis_fcn_del_locs(), rz_analysis_list_vtables(), rz_analysis_noreturn_add(), rz_analysis_noreturn_drop(), rz_analysis_op_to_string(), rz_analysis_trace_bb(), rz_analysis_xrefs_to_graph_cmd_handler(), rz_analysis_xrefs_to_list_handler(), rz_cmd_disassemble_recursively_from_current_block_handler(), rz_cmd_disassemble_recursively_handler(), rz_cmd_disassembly_function_handler(), rz_cmd_disassembly_function_summary_handler(), rz_cmd_print(), rz_comment_function_remove_handler(), rz_core_analysis_address(), rz_core_analysis_coderefs(), rz_core_analysis_datarefs(), rz_core_analysis_fcn(), rz_core_analysis_function_add(), rz_core_analysis_function_set_signature(), rz_core_analysis_function_signature(), rz_core_analysis_function_signature_editor(), rz_core_analysis_function_until(), rz_core_analysis_graph(), rz_core_analysis_hasrefs_to_depth(), rz_core_analysis_resolve_jumps(), rz_core_analysis_undefine(), rz_core_analysis_var_rename(), rz_core_autocomplete(), rz_core_cmd_foreach3(), rz_core_debug_backtraces(), rz_core_get_boundaries_prot(), rz_core_hint_begin(), rz_core_print_disasm_json(), rz_core_search_value_in_range(), rz_core_visual_cmd(), rz_core_visual_define(), rz_core_visual_graph(), rz_core_visual_title(), rz_core_visual_view_graph(), rz_core_visual_xrefs(), rz_debug_thread_list(), rz_flag_local_add_handler(), rz_flag_local_list_handler(), rz_flag_local_remove_handler(), rz_print_areas_no_functions_handler(), rz_seek_function_current_handler(), rz_seek_function_handler(), set_retval(), type_format_print_variable(), var_rename(), var_variables_show(), variable_rename(), and variable_set_type().
RZ_DEPRECATE RZ_API RzAnalysisFunction* rz_analysis_get_fcn_in_bounds | ( | RzAnalysis * | analysis, |
ut64 | addr, | ||
int | type | ||
) |
Definition at line 1708 of file fcn.c.
References addr, rz_analysis_function_t::addr, rz_analysis_t::fcns, NULL, RZ_ANALYSIS_FCN_TYPE_ROOT, rz_analysis_function_contains(), type, and rz_analysis_function_t::type.
Referenced by rz_core_search_value_in_range(), and xrefs_graph().
RZ_API RzAnalysisFunction* rz_analysis_get_function_byname | ( | RzAnalysis * | a, |
const char * | name | ||
) |
Definition at line 1729 of file fcn.c.
References a, f, found, and NULL.
Referenced by function_type_derive(), num_callback(), retype_callee_arg(), rz_core_analysis_function_signature(), and rz_seek_function_handler().
RZ_API int rz_analysis_run_tasks | ( | RZ_NONNULL RzVector * | tasks | ) |
Runs analysis on the task items.
Runs control-flow and variable usage analysis on each of the task items until tasks vector becomes empty. Items are removed from the tasks vector as they are processed. Items are added to the tasks vector as new basic blocks are found to be analyzed.
tasks | Pointer to RzVector of RzAnalysisTaskItem to be performed analysis on. |
Definition at line 1509 of file fcn.c.
References r, run_basic_block_analysis(), RZ_ANALYSIS_RET_BRANCH, RZ_ANALYSIS_RET_COND, RZ_ANALYSIS_RET_END, RZ_ANALYSIS_RET_ERROR, RZ_ANALYSIS_RET_NOP, rz_cons_is_breaked(), rz_return_val_if_fail, rz_vector_empty(), and rz_vector_pop().
Referenced by analyze_function_locally(), and rz_analysis_fcn().
RZ_API bool rz_analysis_task_item_new | ( | RZ_NONNULL RzAnalysis * | analysis, |
RZ_NONNULL RzVector * | tasks, | ||
RZ_NONNULL RzAnalysisFunction * | fcn, | ||
RZ_NULLABLE RzAnalysisBlock * | block, | ||
ut64 | address | ||
) |
Adds a new task item to the tasks
parameter.
Used to create a new item to the tasks
parameter that can be worked on later by the rz_analysis_run_tasks
function.
analysis | Pointer to RzAnalysis instance. |
tasks | Pointer to RzVector to add a new RzAnalysisTaskItem to. |
fcn | Pointer to RzAnalysisFunction in which analysis will be performed on. |
block | Pointer to RzAnalysisBlock in which analysis will be performed on. If null, analysis will take care of block creation. |
address | Address where analysis will start from |
Definition at line 1488 of file fcn.c.
References rz_return_val_if_fail, rz_vector_foreach, rz_vector_push(), rz_analysis_task_item::stack, and rz_analysis_task_item::start_address.
Referenced by run_basic_block_analysis(), rz_analysis_fcn(), rz_analysis_walkthrough_arm_jmptbl_style(), rz_analysis_walkthrough_casetbl(), and rz_analysis_walkthrough_jmptbl().
RZ_API void rz_analysis_trim_jmprefs | ( | RzAnalysis * | analysis, |
RzAnalysisFunction * | fcn | ||
) |
Definition at line 1578 of file fcn.c.
References rz_analysis_plugin_t::arch, rz_analysis_t::cur, rz_analysis_ref_t::from, rz_analysis_function_contains(), rz_analysis_function_get_xrefs_from(), RZ_ANALYSIS_XREF_TYPE_CODE, rz_analysis_xrefs_deln(), rz_list_free(), rz_analysis_ref_t::to, and rz_analysis_ref_t::type.
Referenced by module_match_buffer().
RZ_API RZ_OWN RzList* rz_analysis_types_from_fcn | ( | RzAnalysis * | analysis, |
RzAnalysisFunction * | fcn | ||
) |
Definition at line 2545 of file fcn.c.
References list(), rz_analysis_var_all_list(), rz_list_append(), rz_list_free(), rz_list_new(), rz_list_uniq(), rz_analysis_var_t::type, and typecmp().
Referenced by types_xrefs(), types_xrefs_all(), types_xrefs_function(), types_xrefs_graph(), and types_xrefs_summary().
RZ_API void rz_analysis_update_analysis_range | ( | RzAnalysis * | analysis, |
ut64 | addr, | ||
int | size | ||
) |
Definition at line 2396 of file fcn.c.
References addr, rz_analysis_switch_obj_t::addr, rz_analysis_bb_t::addr, blocks, calc_reachable_and_remove_block(), clear_bb_vars(), rz_analysis_bb_t::fcns, free_ht_up(), rz_analysis_bb_t::ninstr, NULL, rz_analysis_archinfo(), RZ_ANALYSIS_ARCHINFO_ALIGN, rz_analysis_block_get_op_addr(), rz_analysis_block_was_modified(), rz_analysis_function_delete_unused_vars(), rz_analysis_get_blocks_intersect(), rz_list_free(), rz_list_new(), rz_return_if_fail, rz_analysis_bb_t::switch_op, autogen_x86imm::tmp, update_analysis(), update_varz_analysisysis(), and ut64().
Referenced by ev_iowrite_cb().
|
static |
Definition at line 288 of file fcn.c.
References addr, rz_analysis_function_t::addr, rz_analysis_bb_t::addr, rz_flag_bind_t::exist_at, rz_flag_bind_t::f, rz_analysis_t::flb, setup::idx, MAX_FLG_NAME_SIZE, PFMT64u, rz_analysis_block_relocate(), rz_flag_bind_t::set, rz_analysis_bb_t::size, and snprintf.
Referenced by run_basic_block_analysis().
|
static |
Definition at line 263 of file fcn.c.
References rz_analysis_bb_t::addr, rz_analysis_function_t::bbs, rz_analysis_bb_t::cmpreg, rz_analysis_bb_t::cmpval, rz_analysis_bb_t::cond, rz_analysis_bb_t::fail, rz_analysis_bb_t::jump, rz_return_val_if_fail, RZ_TYPE_COND_GT, RZ_TYPE_COND_HI, rz_analysis_cond_t::type, and UT64_MAX.
Referenced by run_basic_block_analysis().
Definition at line 2539 of file fcn.c.
References a, b, rz_types_equal(), and benchmark::t1.
Referenced by rz_analysis_types_from_fcn().
|
static |
Definition at line 2337 of file fcn.c.
References rz_analysis_function_t::addr, rz_analysis_bb_t::addr, analize_descendents(), analyze_function_locally(), rz_analysis_function_t::bbs, rz_analysis_options_t::jmpmid, rz_analysis_function_t::ninstr, rz_analysis_bb_t::ninstr, NULL, rz_analysis_t::opt, rz_analysis_block_automerge(), rz_analysis_block_recurse(), rz_analysis_fcn_invalidate_read_ahead_cache(), rz_analysis_function_delete_unused_vars(), rz_analysis_function_remove_block(), rz_analysis_get_block_at(), rz_list_clone(), rz_list_free(), and autogen_x86imm::tmp.
Referenced by rz_analysis_function_update_analysis(), and rz_analysis_update_analysis_range().
|
static |
Definition at line 2280 of file fcn.c.
References rz_analysis_function_t::analysis, rz_core_bind_t::core, rz_analysis_t::coreb, free(), from, rz_io_bind_t::io, rz_analysis_t::iob, len, malloc(), op, rz_io_bind_t::read_at, rz_analysis_extract_vars(), rz_analysis_op(), rz_analysis_op_fini(), RZ_ANALYSIS_OP_MASK_ESIL, RZ_ANALYSIS_OP_MASK_VAL, RZ_ROUND, to, ut64(), and UT64_SUB_OVFCHK.
Referenced by rz_analysis_update_analysis_range().
Definition at line 49 of file fcn.c.
Referenced by read_ahead(), and rz_analysis_fcn_invalidate_read_ahead_cache().