Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Classes | |
struct | rz_analysis_block_recurse_context_t |
struct | RecurseDepthFirstCtx |
struct | PathContext |
struct | NoreturnSuccessor |
struct | AutomergeCtx |
struct | BlockFromOffsetJmpmidCtx |
Macros | |
#define | unwrap(rbnode) ((rbnode) ? container_of(rbnode, RzAnalysisBlock, _rb) : NULL) |
#define | D if (analysis && analysis->verbose) |
#define | DFLT_NINSTR 3 |
#define | CB_ADDR(addr) |
Typedefs | |
typedef struct rz_analysis_block_recurse_context_t | RzAnalysisBlockRecurseContext |
#define CB_ADDR | ( | addr | ) |
#define unwrap | ( | rbnode | ) | ((rbnode) ? container_of(rbnode, RzAnalysisBlock, _rb) : NULL) |
typedef struct rz_analysis_block_recurse_context_t RzAnalysisBlockRecurseContext |
Definition at line 26 of file block.c.
References addr, rz_analysis_bb_t::addr, container_of, and ut64().
Referenced by rz_analysis_block_merge(), rz_analysis_block_relocate(), rz_analysis_block_set_size(), rz_analysis_block_split(), rz_analysis_block_unref(), rz_analysis_create_block(), and rz_analysis_get_block_at().
void __block_free_rb | ( | RBNode * | node, |
void * | user | ||
) |
Definition at line 85 of file block.c.
References block_free(), and unwrap.
Referenced by rz_analysis_block_merge(), rz_analysis_block_unref(), and rz_analysis_free().
|
static |
Definition at line 12 of file block.c.
References rz_analysis_bb_t::_max_end, rz_analysis_bb_t::addr, rz_rb_node_t::child, test_evm::end, i, rz_analysis_bb_t::size, unwrap, and ut64().
Referenced by rz_analysis_block_merge(), rz_analysis_block_relocate(), rz_analysis_block_set_size(), rz_analysis_block_split(), rz_analysis_block_unref(), and rz_analysis_create_block().
|
static |
Definition at line 96 of file block.c.
References rz_analysis_bb_t::_max_end, rz_analysis_bb_t::_rb, addr, cb, rz_rb_node_t::child, rz_analysis_bb_t::size, and unwrap.
Referenced by rz_analysis_blocks_foreach_in().
|
static |
Definition at line 141 of file block.c.
References rz_analysis_bb_t::_max_end, rz_analysis_bb_t::_rb, addr, cb, rz_rb_node_t::child, test_evm::end, rz_analysis_bb_t::size, unwrap, and ut64().
Referenced by rz_analysis_blocks_foreach_intersect().
Definition at line 871 of file block.c.
References automerge_predecessor_successor_cb(), rz_analysis_function_t::bbs, k, rz_analysis_block_successor_addrs_foreach(), and ut64().
Referenced by rz_analysis_block_automerge().
|
static |
Definition at line 70 of file block.c.
References rz_analysis_bb_t::cond, rz_analysis_bb_t::diff, rz_analysis_bb_t::fcns, rz_analysis_bb_t::fingerprint, free(), rz_analysis_bb_t::op_bytes, rz_analysis_bb_t::op_pos, rz_analysis_bb_t::parent_reg_arena, rz_analysis_cond_free(), rz_analysis_diff_free(), rz_analysis_switch_op_free(), rz_list_free(), and rz_analysis_bb_t::switch_op.
Referenced by __block_free_rb().
|
static |
Definition at line 977 of file block.c.
References rz_analysis_bb_t::addr, and rz_analysis_block_op_starts_at().
Referenced by rz_analysis_find_most_relevant_block_in().
|
static |
Definition at line 126 of file block.c.
References list(), rz_analysis_block_ref(), and rz_list_push().
Referenced by rz_analysis_get_blocks_in(), and rz_analysis_get_blocks_intersect().
|
static |
Definition at line 47 of file block.c.
References a, addr, rz_analysis_bb_t::addr, rz_analysis_bb_t::analysis, rz_analysis_bb_t::cmpval, DFLT_NINSTR, rz_analysis_bb_t::fail, rz_analysis_bb_t::fcns, INT_MAX, rz_analysis_bb_t::jump, NULL, rz_analysis_bb_t::op_pos, rz_analysis_bb_t::op_pos_size, rz_analysis_bb_t::parent_stackptr, rz_analysis_bb_t::ref, rz_analysis_block_update_hash(), rz_list_new(), RZ_NEW0, RZ_NEWS0, rz_analysis_bb_t::size, rz_analysis_bb_t::stackptr, and UT64_MAX.
Referenced by rz_analysis_block_split(), and rz_analysis_create_block().
Definition at line 415 of file block.c.
References addr, NULL, rz_analysis_get_block_at(), and rz_pvector_push().
Referenced by rz_analysis_block_recurse(), and rz_analysis_block_recurse_followthrough().
Definition at line 843 of file block.c.
Referenced by rz_analysis_block_automerge().
Definition at line 758 of file block.c.
References NoreturnSuccessor::block, blocks, rz_analysis_block_ref(), rz_list_push(), and v.
Referenced by rz_analysis_block_chop_noreturn().
Definition at line 748 of file block.c.
References NoreturnSuccessor::block, rz_analysis_bb_t::fcns, NoreturnSuccessor::reachable, rz_analysis_function_remove_block(), rz_list_contains(), and v.
Referenced by rz_analysis_block_chop_noreturn().
|
static |
Definition at line 720 of file block.c.
References NoreturnSuccessor::block, free(), and rz_analysis_block_unref().
Referenced by rz_analysis_block_chop_noreturn().
|
static |
Definition at line 726 of file block.c.
References rz_analysis_bb_t::addr, NoreturnSuccessor::block, NoreturnSuccessor::reachable, rz_analysis_block_ref(), and RZ_NEW0.
Referenced by rz_analysis_block_chop_noreturn().
|
static |
Definition at line 739 of file block.c.
References rz_analysis_bb_t::addr, NULL, and NoreturnSuccessor::reachable.
Referenced by rz_analysis_block_chop_noreturn().
|
static |
Definition at line 560 of file block.c.
References list(), rz_analysis_block_ref(), and rz_list_push().
Referenced by rz_analysis_block_recurse_list().
RZ_API void rz_analysis_block_add_switch_case | ( | RzAnalysisBlock * | block, |
ut64 | switch_addr, | ||
ut64 | case_value, | ||
ut64 | case_addr | ||
) |
Definition at line 575 of file block.c.
References rz_analysis_switch_op_add_case(), rz_analysis_switch_op_new(), and rz_analysis_bb_t::switch_op.
Referenced by apply_case(), and rz_analysis_function_blocks_edge_handler().
RZ_API void rz_analysis_block_analyze_ops | ( | RzAnalysisBlock * | block | ) |
Successively disassemble the ops in this block and update the contained op addrs. This will not move or resize the block itself or touch anything else around it, it is primarily useful when creating or editing blocks after full function analysis.
Definition at line 1084 of file block.c.
References a, addr, rz_analysis_bb_t::addr, rz_analysis_bb_t::analysis, free(), i, malloc(), rz_analysis_bb_t::ninstr, off, op, rz_analysis_block_set_op_offset(), rz_analysis_op(), rz_analysis_op_fini(), rz_return_if_fail, rz_analysis_bb_t::size, UT16_MAX, and ut64().
Referenced by rz_analysis_fcn_add_bb().
Definition at line 892 of file block.c.
References rz_analysis_bb_t::addr, automerge_get_predecessors_cb(), bit, blocks, count_successors_cb(), rz_analysis_bb_t::fcns, free(), rz_list_iter_t::n, NULL, rz_analysis_block_merge(), rz_analysis_block_successor_addrs_foreach(), rz_list_free(), rz_list_new(), rz_list_purge(), rz_list_push(), rz_list_split_iter(), rz_return_if_fail, autogen_x86imm::tmp, and ut64().
Referenced by rz_analysis_block_chop_noreturn(), and update_analysis().
RZ_API RzAnalysisBlock* rz_analysis_block_chop_noreturn | ( | RzAnalysisBlock * | block, |
ut64 | addr | ||
) |
Definition at line 766 of file block.c.
References addr, rz_analysis_function_t::addr, rz_analysis_bb_t::addr, rz_analysis_bb_t::analysis, rz_list_iter_t::data, rz_analysis_bb_t::fail, rz_analysis_bb_t::fcns, rz_list_t::free, rz_list_t::head, rz_analysis_bb_t::jump, rz_list_iter_t::n, noreturn_get_blocks_cb(), noreturn_remove_unreachable_cb(), noreturn_successor_free(), noreturn_successors_cb(), noreturn_successors_reachable_cb(), NULL, rz_analysis_block_automerge(), rz_analysis_block_recurse(), rz_analysis_block_ref(), rz_analysis_block_set_size(), rz_analysis_block_unref(), rz_analysis_block_update_hash(), rz_analysis_get_block_at(), rz_analysis_switch_op_free(), rz_list_clone(), rz_list_contains(), rz_list_free(), rz_list_init(), rz_list_purge(), rz_return_val_if_fail, rz_analysis_bb_t::switch_op, ut64(), and UT64_MAX.
Referenced by relocation_function_process_noreturn(), and rz_core_analysis_propagate_noreturn().
RZ_API ut64 rz_analysis_block_get_op_addr | ( | RzAnalysisBlock * | block, |
size_t | i | ||
) |
Definition at line 1016 of file block.c.
References rz_analysis_bb_t::addr, i, rz_analysis_block_get_op_offset(), UT16_MAX, and UT64_MAX.
Referenced by __opaddr(), analyze_noreturn_function(), clear_bb_vars(), DEFINE_HANDLE_TS_FCN_AND_SYMBOL(), fcn_takeover_block_recursive_followthrough_cb(), rz_analysis_get_jmptbl_info(), rz_analysis_update_analysis_range(), rz_core_analysis_fcn_returns(), and rz_core_seek_bb_instruction().
RZ_API ut64 rz_analysis_block_get_op_addr_in | ( | RzAnalysisBlock * | bb, |
ut64 | off | ||
) |
Definition at line 1048 of file block.c.
References rz_analysis_bb_t::addr, delta, i, rz_analysis_bb_t::ninstr, off, rz_analysis_block_get_op_offset(), and UT64_MAX.
Referenced by prevop_addr(), and rz_core_prevop_addr().
RZ_API ut16 rz_analysis_block_get_op_offset | ( | RzAnalysisBlock * | block, |
size_t | i | ||
) |
Definition at line 1006 of file block.c.
References i, rz_analysis_bb_t::ninstr, rz_analysis_bb_t::op_pos, rz_analysis_bb_t::op_pos_size, and UT16_MAX.
Referenced by bbget(), fcn_get_refs(), rz_analysis_block_get_op_addr(), rz_analysis_block_get_op_addr_in(), rz_analysis_block_get_op_size(), rz_analysis_block_merge(), rz_analysis_block_op_starts_at(), rz_analysis_block_split(), and rz_analysis_get_jmptbl_info().
RZ_API ut64 rz_analysis_block_get_op_size | ( | RzAnalysisBlock * | bb, |
size_t | i | ||
) |
Definition at line 1070 of file block.c.
References i, rz_analysis_bb_t::ninstr, rz_analysis_block_get_op_offset(), rz_analysis_bb_t::size, UT16_MAX, and UT64_MAX.
Referenced by DEFINE_HANDLE_TS_FCN_AND_SYMBOL().
RZ_API bool rz_analysis_block_merge | ( | RzAnalysisBlock * | a, |
RzAnalysisBlock * | b | ||
) |
Definition at line 318 of file block.c.
References __bb_addr_cmp(), __block_free_rb(), __max_end(), rz_analysis_fcn_meta_t::_min, a, b, i, rz_analysis_function_t::meta, NULL, PFMT64x, rz_analysis_block_get_op_offset(), rz_analysis_block_ref(), rz_analysis_block_set_op_offset(), rz_analysis_block_update_hash(), rz_analysis_function_remove_block(), rz_analysis_switch_op_free(), rz_list_contains(), rz_list_first(), rz_list_length(), RZ_LOG_DEBUG, rz_rbtree_aug_delete(), and UT64_MAX.
Referenced by rz_analysis_block_automerge().
RZ_API bool rz_analysis_block_op_starts_at | ( | RzAnalysisBlock * | bb, |
ut64 | addr | ||
) |
Definition at line 582 of file block.c.
References addr, rz_analysis_bb_t::addr, i, rz_analysis_bb_t::ninstr, off, rz_analysis_block_get_op_offset(), UT16_MAX, and ut64().
Referenced by bbget(), block_from_offset_cb(), find_block_at_xref_addr(), and rz_analysis_fcn_bbget_in().
RZ_API bool rz_analysis_block_recurse | ( | RzAnalysisBlock * | block, |
RzAnalysisBlockCb | cb, | ||
void * | user | ||
) |
Definition at line 430 of file block.c.
References rz_analysis_bb_t::addr, rz_analysis_bb_t::analysis, block_recurse_successor_cb(), breaked, cb, NULL, rz_analysis_block_successor_addrs_foreach(), rz_pvector_clear(), rz_pvector_empty(), rz_pvector_init(), rz_pvector_pop(), and rz_pvector_push().
Referenced by analize_addr_cb(), calc_reachable_and_remove_block(), rz_analysis_block_chop_noreturn(), rz_analysis_block_recurse_list(), and update_analysis().
RZ_API bool rz_analysis_block_recurse_depth_first | ( | RzAnalysisBlock * | block, |
RzAnalysisBlockCb | cb, | ||
RZ_NULLABLE RzAnalysisBlockCb | on_exit, | ||
void * | user | ||
) |
Definition at line 492 of file block.c.
References rz_analysis_bb_t::addr, rz_analysis_bb_t::analysis, RecurseDepthFirstCtx::bb, breaked, rz_analysis_switch_obj_t::cases, cb, rz_analysis_bb_t::fail, rz_analysis_case_obj_t::jump, rz_analysis_bb_t::jump, NULL, on_exit(), path, rz_analysis_get_block_at(), rz_list_iter_get_data(), rz_list_iter_get_next(), rz_return_val_if_fail, rz_vector_clear(), rz_vector_empty(), rz_vector_index_ptr(), rz_vector_init(), rz_vector_pop(), rz_vector_push(), RecurseDepthFirstCtx::switch_it, rz_analysis_bb_t::switch_op, and UT64_MAX.
Referenced by rz_core_recover_vars().
RZ_API bool rz_analysis_block_recurse_followthrough | ( | RzAnalysisBlock * | block, |
RzAnalysisBlockCb | cb, | ||
void * | user | ||
) |
Definition at line 458 of file block.c.
References rz_analysis_bb_t::addr, rz_analysis_bb_t::analysis, b, block_recurse_successor_cb(), breaked, cb, NULL, rz_analysis_block_successor_addrs_foreach(), rz_pvector_clear(), rz_pvector_empty(), rz_pvector_init(), rz_pvector_pop(), and rz_pvector_push().
Referenced by fcn_takeover_block_recursive().
RZ_API RzList* rz_analysis_block_recurse_list | ( | RzAnalysisBlock * | block | ) |
Definition at line 567 of file block.c.
References recurse_list_cb(), rz_analysis_block_recurse(), rz_analysis_block_unref(), and rz_list_newf().
RZ_API void rz_analysis_block_ref | ( | RzAnalysisBlock * | bb | ) |
Definition at line 40 of file block.c.
References assert(), and rz_analysis_bb_t::ref.
Referenced by block_list_cb(), DEFINE_HANDLE_TS_FCN_AND_SYMBOL(), fcn_takeover_block_recursive_followthrough_cb(), find_block_at_xref_addr(), noreturn_get_blocks_cb(), noreturn_successors_cb(), recurse_list_cb(), rz_analysis_block_chop_noreturn(), rz_analysis_block_merge(), rz_analysis_block_shortest_path(), rz_analysis_block_split(), rz_analysis_delete_block(), and rz_analysis_function_add_block().
RZ_API bool rz_analysis_block_relocate | ( | RzAnalysisBlock * | block, |
ut64 | addr, | ||
ut64 | size | ||
) |
Definition at line 213 of file block.c.
References __bb_addr_cmp(), __max_end(), rz_analysis_fcn_meta_t::_max, rz_analysis_fcn_meta_t::_min, rz_analysis_bb_t::_rb, addr, rz_analysis_bb_t::addr, rz_analysis_bb_t::analysis, rz_analysis_t::bb_tree, rz_analysis_bb_t::fcns, rz_analysis_function_t::meta, NULL, rz_analysis_block_set_size(), rz_analysis_block_update_hash(), rz_analysis_get_block_at(), rz_rbtree_aug_delete(), rz_rbtree_aug_insert(), rz_analysis_bb_t::size, and UT64_MAX.
Referenced by __rebase_everything(), run_basic_block_analysis(), and skip_hp().
RZ_API bool rz_analysis_block_set_op_offset | ( | RzAnalysisBlock * | block, |
size_t | i, | ||
ut16 | v | ||
) |
set the offset of the i-th instruction in the basicblock bb
Definition at line 1027 of file block.c.
References i, rz_analysis_bb_t::op_pos, rz_analysis_bb_t::op_pos_size, realloc(), and v.
Referenced by run_basic_block_analysis(), rz_analysis_block_analyze_ops(), rz_analysis_block_merge(), and rz_analysis_block_split().
RZ_API void rz_analysis_block_set_size | ( | RzAnalysisBlock * | block, |
ut64 | size | ||
) |
Definition at line 194 of file block.c.
References __bb_addr_cmp(), __max_end(), rz_analysis_fcn_meta_t::_max, rz_analysis_fcn_meta_t::_min, rz_analysis_bb_t::_rb, rz_analysis_bb_t::addr, rz_analysis_bb_t::analysis, rz_analysis_t::bb_tree, rz_analysis_bb_t::fcns, rz_analysis_function_t::meta, NULL, rz_rbtree_aug_update_sum(), rz_analysis_bb_t::size, and UT64_MAX.
Referenced by run_basic_block_analysis(), rz_analysis_block_chop_noreturn(), rz_analysis_block_relocate(), rz_analysis_block_split(), and rz_analysis_function_resize().
RZ_API RZ_NULLABLE RzList* rz_analysis_block_shortest_path | ( | RzAnalysisBlock * | block, |
ut64 | dst | ||
) |
Definition at line 622 of file block.c.
References rz_analysis_bb_t::addr, rz_analysis_bb_t::analysis, dst, found, NULL, rz_analysis_block_ref(), rz_analysis_block_successor_addrs_foreach(), rz_analysis_block_unref(), rz_analysis_get_block_at(), rz_list_newf(), rz_list_prepend(), rz_pvector_clear(), rz_pvector_empty(), rz_pvector_foreach, rz_pvector_init(), rz_pvector_push(), shortest_path_successor_cb(), and autogen_x86imm::tmp.
Referenced by rz_analysis_basic_block_find_paths_handler().
RZ_API RzAnalysisBlock* rz_analysis_block_split | ( | RzAnalysisBlock * | bbi, |
ut64 | addr | ||
) |
Definition at line 255 of file block.c.
References __bb_addr_cmp(), __max_end(), rz_analysis_bb_t::_rb, addr, rz_analysis_bb_t::addr, rz_analysis_bb_t::analysis, rz_analysis_t::bb_tree, block_new(), rz_analysis_bb_t::fail, rz_analysis_bb_t::fcns, i, rz_analysis_bb_t::jump, rz_analysis_bb_t::ninstr, NULL, rz_analysis_bb_t::parent_stackptr, rz_analysis_block_get_op_offset(), rz_analysis_block_ref(), rz_analysis_block_set_op_offset(), rz_analysis_block_set_size(), rz_analysis_block_update_hash(), rz_analysis_function_add_block(), rz_analysis_get_block_at(), rz_rbtree_aug_insert(), rz_return_val_if_fail, rz_analysis_bb_t::size, rz_analysis_bb_t::stackptr, rz_analysis_bb_t::switch_op, and UT64_MAX.
Referenced by run_basic_block_analysis().
RZ_API bool rz_analysis_block_successor_addrs_foreach | ( | RzAnalysisBlock * | block, |
RzAnalysisAddrCb | cb, | ||
void * | user | ||
) |
Definition at line 384 of file block.c.
References rz_analysis_switch_obj_t::cases, CB_ADDR, rz_analysis_bb_t::fail, rz_analysis_case_obj_t::jump, rz_analysis_bb_t::jump, and rz_analysis_bb_t::switch_op.
Referenced by analize_descendents(), automerge_get_predecessors_cb(), rz_analysis_block_automerge(), rz_analysis_block_recurse(), rz_analysis_block_recurse_followthrough(), and rz_analysis_block_shortest_path().
RZ_API void rz_analysis_block_unref | ( | RzAnalysisBlock * | bb | ) |
Definition at line 370 of file block.c.
References __bb_addr_cmp(), __block_free_rb(), __max_end(), rz_analysis_bb_t::addr, rz_analysis_bb_t::analysis, assert(), rz_analysis_t::bb_tree, rz_analysis_bb_t::fcns, NULL, rz_analysis_bb_t::ref, rz_list_length(), and rz_rbtree_aug_delete().
Referenced by DEFINE_HANDLE_TS_FCN_AND_SYMBOL(), fcn_takeover_block_recursive_followthrough_cb(), noreturn_successor_free(), run_basic_block_analysis(), rz_analysis_block_chop_noreturn(), rz_analysis_block_recurse_list(), rz_analysis_block_shortest_path(), rz_analysis_delete_block(), rz_analysis_fcn_add_bb(), rz_analysis_function_free(), rz_analysis_function_remove_block(), rz_analysis_get_blocks_in(), rz_analysis_get_blocks_intersect(), rz_core_analysis_propagate_noreturn(), and rz_serialize_analysis_load().
RZ_API void rz_analysis_block_update_hash | ( | RzAnalysisBlock * | block | ) |
Definition at line 698 of file block.c.
References rz_analysis_bb_t::addr, rz_analysis_bb_t::analysis, rz_analysis_bb_t::bbhash, free(), rz_analysis_t::hash, rz_io_bind_t::io, rz_analysis_t::iob, malloc(), rz_io_bind_t::read_at, rz_hash_xxhash(), rz_return_if_fail, and rz_analysis_bb_t::size.
Referenced by block_new(), run_basic_block_analysis(), rz_analysis_block_chop_noreturn(), rz_analysis_block_merge(), rz_analysis_block_relocate(), rz_analysis_block_split(), and rz_analysis_function_resize().
RZ_API bool rz_analysis_block_was_modified | ( | RzAnalysisBlock * | block | ) |
Definition at line 680 of file block.c.
References rz_analysis_bb_t::addr, rz_analysis_bb_t::analysis, rz_analysis_bb_t::bbhash, free(), rz_analysis_t::hash, rz_io_bind_t::io, rz_analysis_t::iob, malloc(), rz_io_bind_t::read_at, rz_hash_xxhash(), rz_return_val_if_fail, and rz_analysis_bb_t::size.
Referenced by rz_analysis_function_update_analysis(), rz_analysis_function_was_modified(), and rz_analysis_update_analysis_range().
RZ_API bool rz_analysis_blocks_foreach_in | ( | RzAnalysis * | analysis, |
ut64 | addr, | ||
RzAnalysisBlockCb | cb, | ||
void * | user | ||
) |
Definition at line 122 of file block.c.
References addr, all_in(), rz_analysis_t::bb_tree, cb, and unwrap.
Referenced by rz_analysis_find_most_relevant_block_in(), rz_analysis_function_contains(), rz_analysis_get_blocks_in(), and rz_analysis_get_functions_in().
RZ_API void rz_analysis_blocks_foreach_intersect | ( | RzAnalysis * | analysis, |
ut64 | addr, | ||
ut64 | size, | ||
RzAnalysisBlockCb | cb, | ||
void * | user | ||
) |
Definition at line 161 of file block.c.
References addr, all_intersect(), rz_analysis_t::bb_tree, cb, and unwrap.
Referenced by rz_analysis_get_blocks_intersect().
RZ_API RzAnalysisBlock* rz_analysis_create_block | ( | RzAnalysis * | analysis, |
ut64 | addr, | ||
ut64 | size | ||
) |
Definition at line 174 of file block.c.
References __bb_addr_cmp(), __max_end(), rz_analysis_bb_t::_rb, addr, rz_analysis_bb_t::addr, rz_analysis_t::bb_tree, block_new(), NULL, rz_analysis_get_block_at(), and rz_rbtree_aug_insert().
Referenced by fcn_append_basic_block(), and rz_analysis_fcn_add_bb().
RZ_API void rz_analysis_delete_block | ( | RzAnalysisBlock * | bb | ) |
Definition at line 186 of file block.c.
References rz_analysis_bb_t::fcns, rz_analysis_block_ref(), rz_analysis_block_unref(), rz_analysis_function_remove_block(), and rz_list_first().
Referenced by rz_analysis_fcn_add_bb().
RZ_API RzAnalysisBlock* rz_analysis_find_most_relevant_block_in | ( | RzAnalysis * | analysis, |
ut64 | off | ||
) |
Find a single block that seems to be the "most relevant" one that contains the given offset. This should only be used when explicitly only a single basic block should be considered, for example for user-exposed features, since it can always be that multiple blocks overlap. Use rz_analysis_get_blocks_in() in all other cases!
Definition at line 997 of file block.c.
References block_from_offset_cb(), NULL, off, and rz_analysis_blocks_foreach_in().
Referenced by agraph_refresh(), analPathFollow(), analysis_path_exists(), check_changes(), cmd_analysis_esil(), disasm_strings(), get_cgnodes(), handleMidFlags(), prevop_addr(), recurse_bb(), rz_analysis_basic_block_info_handler(), rz_analysis_function_blocks_color_handler(), rz_analysis_function_blocks_del_handler(), rz_analysis_function_blocks_info_handler(), rz_analysis_op_to_string(), rz_cmd_disassembly_basic_block_as_text_json_handler(), rz_cmd_disassembly_basic_block_handler(), rz_cmd_print(), rz_core_analysis_bb_seek(), rz_core_analysis_esil_emulate_bb(), rz_core_analysis_paths(), rz_core_prevop_addr(), rz_core_seek_analysis_bb(), rz_core_seek_bb_instruction(), rz_core_visual_graph(), and seek_to_node().
RZ_API RzAnalysisBlock* rz_analysis_get_block_at | ( | RzAnalysis * | analysis, |
ut64 | addr | ||
) |
Definition at line 90 of file block.c.
References __bb_addr_cmp(), addr, rz_analysis_t::bb_tree, NULL, rz_rbtree_find(), and unwrap.
Referenced by analize_addr_cb(), block_recurse_successor_cb(), calc_reachable_and_remove_block(), function_load_cb(), get_bb_body(), get_next_i(), pr_bb(), rz_analysis_basic_block_find_paths_handler(), rz_analysis_block_chop_noreturn(), rz_analysis_block_recurse_depth_first(), rz_analysis_block_relocate(), rz_analysis_block_shortest_path(), rz_analysis_block_split(), rz_analysis_create_block(), rz_analysis_fcn_add_bb(), rz_analysis_fcn_bbget_at(), rz_core_analysis_esil(), rz_core_recover_vars(), shortest_path_successor_cb(), and update_analysis().
RZ_API RzList* rz_analysis_get_blocks_in | ( | RzAnalysis * | analysis, |
ut64 | addr | ||
) |
Definition at line 133 of file block.c.
References addr, block_list_cb(), list(), rz_analysis_block_unref(), rz_analysis_blocks_foreach_in(), and rz_list_newf().
Referenced by bbget(), cmd_analysis_esil(), DEFINE_HANDLE_TS_FCN_AND_SYMBOL(), ds_show_flags(), find_block_at_xref_addr(), rz_analysis_function_analyze_jmptable_handler(), rz_analysis_function_blocks_edge_handler(), and rz_analysis_function_blocks_switch_type_handler().
RZ_API RzList* rz_analysis_get_blocks_intersect | ( | RzAnalysis * | analysis, |
ut64 | addr, | ||
ut64 | size | ||
) |
Definition at line 165 of file block.c.
References addr, block_list_cb(), list(), NULL, rz_analysis_block_unref(), rz_analysis_blocks_foreach_intersect(), and rz_list_newf().
Referenced by rz_analysis_update_analysis_range().
Definition at line 608 of file block.c.
References addr, NULL, rz_analysis_get_block_at(), and rz_pvector_push().
Referenced by rz_analysis_block_shortest_path().