Rizin
unix-like reverse engineering framework and cli tools
|
#include <rz_analysis.h>
#include <rz_asm.h>
#include <rz_lib.h>
#include <rz_types.h>
#include <rz_util.h>
#include <stdio.h>
#include <string.h>
#include <rz_main.h>
#include <rz_core.h>
Go to the source code of this file.
Classes | |
struct | RzAsmState |
Enumerations | |
enum | DisasmMode { DISASM_MODE_DONT = 0 , DISASM_MODE_DEFAULT , DISASM_MODE_WITH_BYTES , DISASM_MODE_ESIL , DISASM_MODE_IL } |
enum DisasmMode |
|
static |
Definition at line 51 of file rz-asm.c.
References RzAsmState::a, RzAsmState::analysis, free(), RzAsmState::l, rz_asm_t::num, rz_analysis_free(), rz_asm_free(), rz_lib_free(), and rz_num_free().
Referenced by rz_main_rz_asm().
|
static |
Definition at line 36 of file rz-asm.c.
References __as_set_archbits(), __load_plugins(), RzAsmState::a, RzAsmState::analysis, RzAsmState::l, NULL, rz_asm_t::num, rz_analysis_new(), rz_asm_new(), rz_lib_new(), RZ_NEW0, and rz_num_new().
Referenced by rz_main_rz_asm().
|
static |
Definition at line 28 of file rz-asm.c.
References RzAsmState::a, RzAsmState::analysis, rz_analysis_set_bits(), rz_analysis_use(), rz_asm_set_bits(), rz_asm_use(), RZ_SYS_ARCH, RZ_SYS_BITS, and RZ_SYS_BITS_64.
Referenced by __as_new().
|
static |
Definition at line 454 of file rz-asm.c.
References RzAsmState::analysis, and rz_analysis_add().
Referenced by __load_plugins().
|
static |
Definition at line 447 of file rz-asm.c.
References RzAsmState::a, and rz_asm_add().
Referenced by __load_plugins().
|
static |
Definition at line 479 of file rz-asm.c.
References __lib_analysis_cb(), __lib_asm_cb(), free(), RzAsmState::l, NULL, path, RZ_HOME_OLD_PLUGINS, rz_lib_add_handler(), RZ_LIB_ENV, rz_lib_opendir(), RZ_LIB_TYPE_ANALYSIS, RZ_LIB_TYPE_ASM, rz_path_home_prefix(), rz_path_system(), RZ_PLUGINS, RZ_STR_ISEMPTY, rz_sys_getenv(), and autogen_x86imm::tmp.
Referenced by __as_new().
|
static |
Definition at line 227 of file rz-asm.c.
References RzAsmState::analysis, eprintf, free(), NULL, printf(), rz_analysis_il_vm_free(), rz_analysis_il_vm_new(), rz_il_op_effect_stringify(), rz_il_validate_effect(), rz_il_validate_global_context_free(), rz_il_validate_global_context_new_from_vm(), rz_strbuf_fini(), rz_strbuf_get(), rz_strbuf_init(), sb, and rz_analysis_il_vm_t::vm.
Referenced by rasm_disasm().
|
static |
Definition at line 460 of file rz-asm.c.
References RzAsmState::a, arch, rz_asm_t::bits, bits(), rz_asm_t::flags, len, NULL, PFMT64x, print_label(), printf(), rasm_asm(), and RZ_SYS_ARCH.
Referenced by rz_main_rz_asm().
|
static |
Definition at line 374 of file rz-asm.c.
References RzAsmState::coutput, i, printf(), and cmd_descs_generate::str.
Referenced by rasm_asm().
|
static |
Definition at line 396 of file rz-asm.c.
References RzAsmState::a, b, bits(), bytes, rz_asm_code_t::bytes, eprintf, free(), i, rz_asm_code_t::len, print_buf(), printf(), rz_asm_code_free(), rz_asm_code_get_hex(), rz_asm_rasm_assemble(), rz_asm_set_pc(), rz_read_ble32(), RZ_SYS_ENDIAN, cmd_descs_generate::str, and write.
Referenced by print_assembly_output(), and rz_main_rz_asm().
|
static |
Definition at line 268 of file rz-asm.c.
References RzAsmState::a, addr, RzAsmState::analysis, rz_asm_code_t::assembly, bits(), DISASM_MODE_ESIL, DISASM_MODE_IL, DISASM_MODE_WITH_BYTES, eprintf, rz_analysis_op_t::esil, free(), len, rz_asm_code_t::len, malloc(), NULL, RzAsmState::oneliner, op, rz_asm_t::pc, PFMT64x, print_and_check_il(), printf(), rz_analysis_op(), rz_analysis_op_fini(), RZ_ANALYSIS_OP_MASK_ESIL, RZ_ANALYSIS_OP_MASK_IL, rz_asm_code_free(), rz_asm_disassemble(), rz_asm_mdisassemble(), rz_asm_op_get_asm(), rz_asm_op_get_hex(), rz_asm_op_set_asm(), rz_asm_set_pc(), rz_hex_str2bin(), rz_str_replace_char(), RZ_STRBUF_SAFEGET, rz_analysis_op_t::size, and ut64().
Referenced by rz_main_rz_asm().
Definition at line 170 of file rz-asm.c.
References printf(), rz_asm_list_directives(), and v.
Referenced by rz_main_rz_asm().
Definition at line 508 of file rz-asm.c.
References __as_free(), __as_new(), RzAsmState::a, rz_core_t::analysis, RzAsmState::analysis, arch, rz_getopt_t::arg, rz_getopt_t::argv, argv, rz_asm_t::bits, bits(), buflen, c, close, RzAsmState::coutput, cpu, dis(), DISASM_MODE_DEFAULT, DISASM_MODE_DONT, DISASM_MODE_ESIL, DISASM_MODE_IL, DISASM_MODE_WITH_BYTES, dup2, eprintf, fd, filters, free(), cmd_descs_generate::help, setup::idx, rz_getopt_t::ind, RzAsmState::json, len, length, NULL, O_CREAT, O_RDWR, O_TRUNC, RzAsmState::oneliner, p, print_assembly_output(), printf(), RzAsmState::quiet, rz_core_t::rasm, rasm_asm(), rasm_disasm(), rasm_show_help(), read(), rz_analysis_set_big_endian(), rz_analysis_set_bits(), rz_analysis_set_cpu(), rz_analysis_use(), rz_asm_describe(), rz_asm_set_big_endian(), rz_asm_set_bits(), rz_asm_set_cpu(), rz_asm_set_syntax(), rz_asm_sub_names_input(), rz_asm_sub_names_output(), rz_asm_syntax_from_string(), rz_asm_use(), rz_cmd_state_output_fini(), rz_cmd_state_output_init(), rz_cmd_state_output_print(), rz_cons_flush(), rz_core_asm_plugins_print(), rz_core_free(), rz_core_new(), rz_file_slurp(), rz_getopt_init(), rz_getopt_next(), rz_main_version_print(), rz_num_math(), RZ_OUTPUT_MODE_JSON, RZ_OUTPUT_MODE_STANDARD, rz_stdin_slurp(), RZ_SYS_ARCH, rz_sys_getenv(), rz_syscall_new(), rz_syscall_setup(), RZ_VERSION, s, show_analinfo(), skip(), ST32_MAX, strdup(), benchmark::syntax, rz_asm_t::syscall, and ut64().
Referenced by MAIN_NAME().
|
static |
Definition at line 123 of file rz-asm.c.
References RzAsmState::analysis, arg(), eprintf, free(), RzAsmState::json, len, NULL, PFMT64x, pj_a(), pj_end(), pj_free(), pj_ks(), pj_new(), pj_o(), pj_string(), printf(), rz_analysis_op(), rz_analysis_op_fini(), RZ_ANALYSIS_OP_MASK_BASIC, RZ_ANALYSIS_OP_MASK_ESIL, rz_hex_bin2strdup(), rz_hex_str2bin(), showanalysis(), rz_analysis_op_t::size, and strdup().
Referenced by rz_main_rz_asm().
|
static |
Definition at line 72 of file rz-asm.c.
References bytes, free(), RzAsmState::json, len, PFMT64d, PFMT64x, pj_end(), pj_kn(), pj_ks(), pj_o(), printf(), rz_analysis_optype_to_string(), rz_hex_bin2strdup(), RZ_MIN, rz_strbuf_get(), stackop2str(), and UT64_MAX.
Referenced by show_analinfo().
|
static |
Definition at line 61 of file rz-asm.c.
References RZ_ANALYSIS_STACK_GET, RZ_ANALYSIS_STACK_NOP, RZ_ANALYSIS_STACK_NULL, RZ_ANALYSIS_STACK_SET, strdup(), and type.
Referenced by showanalysis().