Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Macros | |
#define | IFDBG if (0) |
Definition at line 425 of file casm.c.
References addr, eprintf, free(), hit(), IFDBG, is_valid(), len, NULL, PFMT64x, rz_core_asm_hit_new(), and rz_list_append().
Referenced by rz_core_asm_bwdisassemble().
Definition at line 413 of file casm.c.
References addr, eprintf, hit(), IFDBG, is_valid(), len, NULL, PFMT64x, rcoreasm_address_comparator(), rz_core_asm_hit_new(), and rz_list_add_sorted().
Referenced by handle_forward_disassemble(), and rz_core_asm_back_disassemble().
Definition at line 475 of file casm.c.
References addr, NULL, rcoreasm_address_comparator(), rz_list_find(), and rz_list_iter_get_data().
Referenced by handle_forward_disassemble().
|
static |
Definition at line 484 of file casm.c.
References add_hit_to_sorted_hits(), test_evm::end, eprintf, find_addr(), hit(), IFDBG, is_addr_in_range(), is_valid(), len, NULL, op, PFMT64d, PFMT64x, prune_hits_in_addr_range(), rz_core_t::rasm, rcoreasm_address_comparator(), rz_asm_disassemble(), rz_asm_set_pc(), RZ_FREE, rz_list_add_sorted(), start, and ut64().
Referenced by rz_core_asm_back_disassemble().
Definition at line 67 of file casm.c.
References rz_core_t::analysis, h, NULL, rz_analysis_t::plugins, and rz_return_val_if_fail.
Referenced by rz_core_asm_plugin_print().
Definition at line 551 of file casm.c.
References test_evm::end, and start.
Referenced by handle_forward_disassemble(), and is_hit_inrange().
Definition at line 602 of file casm.c.
References hit(), and is_addr_in_range().
Referenced by prune_hits_in_hit_range().
Definition at line 439 of file casm.c.
References addr, hit(), is_valid(), len, prune_hits_in_hit_range(), and RZ_EMPTY.
Referenced by handle_forward_disassemble(), and rz_core_asm_back_disassemble().
Definition at line 447 of file casm.c.
References eprintf, hit(), IFDBG, is_hit_inrange(), NULL, PFMT64x, rz_list_delete(), and ut64().
Referenced by prune_hits_in_addr_range().
|
static |
Definition at line 18 of file casm.c.
Referenced by add_hit_to_sorted_hits(), find_addr(), handle_forward_disassemble(), and rz_core_asm_back_disassemble_all().
|
static |
Definition at line 735 of file casm.c.
References add_hit_to_sorted_hits(), addr, eprintf, free(), handle_forward_disassemble(), hex_str, IFDBG, rz_core_t::io, is_valid(), len, malloc(), memset(), NULL, op, PFMT64x, prune_hits_in_addr_range(), rz_core_t::rasm, rz_asm_disassemble(), rz_asm_set_pc(), rz_cons_is_breaked(), rz_core_asm_back_disassemble_all(), rz_core_asm_hit_list_new(), rz_hex_bin2strdup(), rz_io_read_at(), rz_list_length(), rz_list_purge(), rz_strbuf_get(), and ut64().
Referenced by rz_core_asm_back_disassemble_byte(), and rz_core_asm_back_disassemble_instr().
|
static |
Definition at line 678 of file casm.c.
References addr, eprintf, free(), hit(), IFDBG, rz_core_t::io, len, malloc(), memset(), NULL, op, PFMT64x, rz_core_t::rasm, rcoreasm_address_comparator(), rz_asm_disassemble(), rz_asm_set_pc(), rz_cons_is_breaked(), rz_core_asm_hit_list_new(), rz_core_asm_hit_new(), rz_io_read_at(), rz_list_add_sorted(), rz_list_purge(), and ut64().
Referenced by rz_core_asm_back_disassemble().
RZ_API RzList* rz_core_asm_back_disassemble_byte | ( | RzCore * | core, |
ut64 | addr, | ||
int | len, | ||
ut32 | hit_count, | ||
ut32 | extra_padding | ||
) |
Definition at line 882 of file casm.c.
References addr, len, and rz_core_asm_back_disassemble().
RZ_API RzList* rz_core_asm_back_disassemble_instr | ( | RzCore * | core, |
ut64 | addr, | ||
int | len, | ||
ut32 | hit_count, | ||
ut32 | extra_padding | ||
) |
Definition at line 876 of file casm.c.
References addr, len, and rz_core_asm_back_disassemble().
Definition at line 890 of file casm.c.
References rz_core_t::blocksize, hit(), NULL, rz_core_t::offset, rz_core_asm_bwdisassemble(), rz_list_free(), rz_list_get_bottom(), and rz_list_length().
Referenced by rz_cmd_search(), and rz_core_seek_opcode_backward().
Definition at line 612 of file casm.c.
References add_hit_to_hits(), addr, rz_io_t::addrbytes, c, free(), setup::idx, rz_core_t::io, len, malloc(), n, NULL, op, rz_core_t::rasm, rz_asm_code_free(), rz_asm_disassemble(), rz_asm_mdisassemble(), rz_asm_set_pc(), rz_cons_is_breaked(), rz_core_asm_hit_list_new(), rz_io_read_at(), rz_list_free(), RZ_MIN, and ut64().
Referenced by rz_core_asm_bwdis_len().
RZ_API void rz_core_asm_hit_free | ( | void * | _hit | ) |
Definition at line 38 of file casm.c.
References list(), rz_core_asm_hit_free(), and rz_list_new().
Referenced by construct_rop_gadget(), rz_cmd_search(), rz_core_asm_back_disassemble(), rz_core_asm_back_disassemble_all(), rz_core_asm_bwdisassemble(), and rz_core_asm_strsearch().
RZ_API RzCoreAsmHit* rz_core_asm_hit_new | ( | void | ) |
Definition at line 28 of file casm.c.
References hit(), NULL, and RZ_NEW0.
Referenced by add_hit_to_hits(), add_hit_to_sorted_hits(), construct_rop_gadget(), rz_cmd_search(), rz_core_asm_back_disassemble_all(), and rz_core_asm_strsearch().
RZ_API RzCmdStatus rz_core_asm_plugin_print | ( | RzCore * | core, |
RzAsmPlugin * | ap, | ||
const char * | arch, | ||
RzCmdStateOutput * | state, | ||
const char * | license | ||
) |
Definition at line 79 of file casm.c.
References rz_asm_plugin_t::assemble, rz_asm_plugin_t::author, rz_asm_plugin_t::bits, bits(), rz_asm_plugin_t::desc, rz_asm_plugin_t::disassemble, has_esil(), rz_asm_plugin_t::name, pj_end(), pj_ko(), pj_ks(), RZ_CMD_STATUS_NONEXISTINGCMD, RZ_CMD_STATUS_OK, rz_cons_newline(), rz_cons_printf(), rz_cons_println(), RZ_OUTPUT_MODE_JSON, RZ_OUTPUT_MODE_QUIET, RZ_OUTPUT_MODE_STANDARD, rz_warn_if_reached, and rz_asm_plugin_t::version.
Referenced by rz_core_asm_plugins_print().
RZ_API RzCmdStatus rz_core_asm_plugins_print | ( | RzCore * | core, |
const char * | arch, | ||
RzCmdStateOutput * | state | ||
) |
Definition at line 150 of file casm.c.
References a, arch, c, rz_asm_plugin_t::cpus, free(), i, rz_asm_plugin_t::license, n, rz_asm_plugin_t::name, rz_core_t::rasm, rz_cmd_state_output_array_end(), rz_cmd_state_output_array_start(), RZ_CMD_STATUS_OK, rz_cons_println(), rz_core_asm_plugin_print(), rz_str_split(), rz_str_word_get0(), status, and strdup().
Referenced by cb_asmarch(), cb_asmcpu(), rz_list_plugins_handler(), rz_main_rz_asm(), and rz_plugins_asm_print_handler().
Definition at line 56 of file casm.c.
References input(), NULL, rz_core_t::rasm, rz_asm_code_free(), rz_asm_code_get_hex(), and rz_asm_massemble().
Referenced by rz_cmd_search().
RZ_API RzList* rz_core_asm_strsearch | ( | RzCore * | core, |
const char * | input, | ||
ut64 | from, | ||
ut64 | to, | ||
int | maxhits, | ||
int | regexp, | ||
int | everyByte, | ||
int | mode | ||
) |
Definition at line 185 of file casm.c.
References addr, rz_io_t::addrbytes, rz_search_t::align, analop(), rz_core_t::analysis, rz_core_t::blocksize, calloc(), count, eprintf, free(), from, hit(), i, setup::idx, input(), rz_core_t::io, len, NULL, rz_core_t::num, rz_core_t::offset, op, rz_core_t::rasm, rz_analysis_op(), rz_analysis_op_fini(), RZ_ANALYSIS_OP_MASK_BASIC, RZ_ANALYSIS_OP_MASK_DISASM, RZ_ANALYSIS_OP_MASK_ESIL, RZ_ARRAY_SIZE, rz_asm_disassemble(), rz_asm_op_fini(), rz_asm_set_pc(), rz_cons_break_pop(), rz_cons_break_push(), rz_cons_is_breaked(), rz_core_asm_hit_free(), rz_core_asm_hit_list_new(), rz_core_asm_hit_new(), RZ_FREE, rz_io_is_valid_offset(), rz_io_read_at(), rz_list_append(), rz_list_purge(), RZ_MAX, RZ_MIN, rz_num_math(), rz_regex_exec(), rz_regex_free(), rz_regex_new(), rz_str_appendf(), rz_str_ncasecmp(), rz_str_new(), rz_str_trim(), rz_str_trim_dup(), rz_strbuf_get(), rz_core_t::search, st64, ST64_MAX, strdup(), to, ut64(), UT64_MAX, v, and val.
Referenced by do_asm_search().