Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Classes | |
struct | disassemble_info |
struct | disasm_options_t |
Macros | |
#define | bfd_zalloc calloc |
#define | bfd_malloc malloc |
#define | xmalloc malloc |
#define | INSN_HAS_RELOC (1LL << 31) |
#define | DISASSEMBLE_DATA (1LL << 30) |
#define | USER_SPECIFIED_MACHINE_TYPE (1LL << 29) |
#define | FOR_EACH_DISASSEMBLER_OPTION(OPT, OPTIONS) |
#define | INIT_DISASSEMBLE_INFO(INFO, STREAM, FPRINTF_FUNC) init_disassemble_info(&(INFO), (STREAM), (fprintf_ftype)(FPRINTF_FUNC)) |
#define | INIT_DISASSEMBLE_INFO_NO_ARCH(INFO, STREAM, FPRINTF_FUNC) init_disassemble_info(&(INFO), (STREAM), (fprintf_ftype)(FPRINTF_FUNC)) |
#define | DECLARE_GENERIC_FPRINTF_FUNC() |
#define | DECLARE_GENERIC_PRINT_ADDRESS_FUNC() |
Typedefs | |
typedef int(* | fprintf_ftype) (void *, const char *,...) ATTRIBUTE_FPTR_PRINTF_2 |
typedef struct disassemble_info | disassemble_info |
typedef int(* | disassembler_ftype) (bfd_vma, disassemble_info *) |
Enumerations | |
enum | dis_insn_type { dis_noninsn , dis_nonbranch , dis_branch , dis_condbranch , dis_jsr , dis_condjsr , dis_dref , dis_dref2 } |
#define bfd_malloc malloc |
Definition at line 42 of file disas-asm.h.
#define bfd_zalloc calloc |
Definition at line 41 of file disas-asm.h.
#define DECLARE_GENERIC_FPRINTF_FUNC | ( | ) |
Definition at line 422 of file disas-asm.h.
#define DECLARE_GENERIC_PRINT_ADDRESS_FUNC | ( | ) |
Definition at line 435 of file disas-asm.h.
#define DISASSEMBLE_DATA (1LL << 30) |
Definition at line 120 of file disas-asm.h.
Definition at line 382 of file disas-asm.h.
#define INIT_DISASSEMBLE_INFO | ( | INFO, | |
STREAM, | |||
FPRINTF_FUNC | |||
) | init_disassemble_info(&(INFO), (STREAM), (fprintf_ftype)(FPRINTF_FUNC)) |
Definition at line 417 of file disas-asm.h.
#define INIT_DISASSEMBLE_INFO_NO_ARCH | ( | INFO, | |
STREAM, | |||
FPRINTF_FUNC | |||
) | init_disassemble_info(&(INFO), (STREAM), (fprintf_ftype)(FPRINTF_FUNC)) |
Definition at line 419 of file disas-asm.h.
#define INSN_HAS_RELOC (1LL << 31) |
Definition at line 118 of file disas-asm.h.
#define USER_SPECIFIED_MACHINE_TYPE (1LL << 29) |
Definition at line 123 of file disas-asm.h.
#define xmalloc malloc |
Definition at line 43 of file disas-asm.h.
typedef struct disassemble_info disassemble_info |
typedef int(* disassembler_ftype) (bfd_vma, disassemble_info *) |
Definition at line 238 of file disas-asm.h.
typedef int(* fprintf_ftype) (void *, const char *,...) ATTRIBUTE_FPTR_PRINTF_2 |
Definition at line 45 of file disas-asm.h.
enum dis_insn_type |
Enumerator | |
---|---|
dis_noninsn | |
dis_nonbranch | |
dis_branch | |
dis_condbranch | |
dis_jsr | |
dis_condjsr | |
dis_dref | |
dis_dref2 |
Definition at line 47 of file disas-asm.h.
bfd_boolean aarch64_symbol_is_valid | ( | asymbol * | , |
struct disassemble_info * | |||
) |
disassembler_ftype arc_get_disassembler | ( | bfd * | ) |
bfd_boolean arm_symbol_is_valid | ( | asymbol * | , |
struct disassemble_info * | |||
) |
disassembler_ftype cris_get_disassembler | ( | bfd * | abfd | ) |
Definition at line 1635 of file cris-dis.c.
References bfd_get_symbol_leading_char, print_insn_cris_with_register_prefix(), print_insn_cris_without_register_prefix(), print_insn_crisv10_v32_with_register_prefix(), print_insn_crisv10_v32_without_register_prefix(), print_insn_crisv32_with_register_prefix(), and print_insn_crisv32_without_register_prefix().
void disassemble_init_for_target | ( | struct disassemble_info * | dinfo | ) |
void disassemble_init_powerpc | ( | struct disassemble_info * | ) |
void disassemble_init_s390 | ( | struct disassemble_info * | ) |
disassembler_ftype disassembler | ( | bfd * | ) |
const disasm_options_t* disassembler_options_arm | ( | void | ) |
const disasm_options_t* disassembler_options_powerpc | ( | void | ) |
const disasm_options_t* disassembler_options_s390 | ( | void | ) |
void disassembler_usage | ( | FILE * | ) |
void generic_print_address | ( | bfd_vma | , |
struct disassemble_info * | |||
) |
int generic_symbol_at_address | ( | bfd_vma | , |
struct disassemble_info * | |||
) |
bfd_boolean generic_symbol_is_valid | ( | asymbol * | , |
struct disassemble_info * | |||
) |
void init_disassemble_info | ( | struct disassemble_info * | dinfo, |
void * | stream, | ||
fprintf_ftype | fprintf_func | ||
) |
|
inlinestatic |
Definition at line 374 of file disas-asm.h.
void perror_memory | ( | int | , |
bfd_vma | , | ||
struct disassemble_info * | |||
) |
void print_aarch64_disassembler_options | ( | FILE * | stream | ) |
void print_arc_disassembler_options | ( | FILE * | ) |
void print_arm_disassembler_options | ( | FILE * | ) |
void print_i386_disassembler_options | ( | FILE * | ) |
int print_insn_aarch64 | ( | bfd_vma | pc, |
disassemble_info * | info | ||
) |
Definition at line 3248 of file aarch64-dis.c.
References addr, bfd_asymbol_flavour, bfd_asymbol_value, BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, bfd_get_bits(), bfd_target_elf_flavour, FALSE, found, get_sym_code_type(), info(), INSNLEN, last_mapping_addr, last_mapping_sym, last_type, MAP_DATA, MAP_INSN, n, NULL, parse_aarch64_dis_options(), pc, print_insn_aarch64_word(), print_insn_data(), set_default_aarch64_dis_options(), status, TRUE, and type.
int print_insn_alpha | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_avr | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_bfin | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_big_arm | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_big_mips | ( | bfd_vma | memaddr, |
disassemble_info * | info | ||
) |
Definition at line 2098 of file mips-dis.c.
References _print_insn_mips(), BFD_ENDIAN_BIG, and info().
Referenced by disassemble().
int print_insn_big_nios2 | ( | bfd_vma | address, |
disassemble_info * | info | ||
) |
Definition at line 422 of file nios2-dis.c.
References BFD_ENDIAN_BIG, info(), and print_insn_nios2().
int print_insn_big_powerpc | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_big_score | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_cr16 | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_crx | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_d10v | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_d30v | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_dlx | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_epiphany | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_fr30 | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_frv | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_ft32 | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_h8300 | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_h8300h | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_h8300s | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_h8500 | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_hppa | ( | bfd_vma | memaddr, |
disassemble_info * | info | ||
) |
Definition at line 361 of file hppa-dis.c.
References a, add_compl_names, add_cond_64_names, add_cond_names, pa_opcode::arch, pa_opcode::args, bb_cond_64_names, bfd_getb32(), cmpib_cond_64_names, compare_cond_64_names, compare_cond_names, cond, dest, extract_10U_store(), extract_11(), extract_12(), extract_14(), extract_16(), extract_17(), extract_21(), extract_22(), extract_3(), extract_5_load(), extract_5_store(), extract_5Q_store(), extract_5r_store(), extract_5R_store(), fcnv_fixed_names, fcnv_ufixed_names, float_comp_names, float_format_names, fput_const(), fput_creg(), fput_fp_reg(), fput_fp_reg_r(), fput_reg(), fputs_filtered, GET_COMPL, GET_COND, GET_FIELD, i, index_compl_names, info(), logical_cond_64_names, logical_cond_names, regress::m, pa_opcode::mask, pa_opcode::match, mix_half_names, pa_opcode::name, num, NUMOPCODES, opc, pa20w, pa_opcodes, read_write_names, reg, s, saturation_names, shift_cond_64_names, shift_cond_names, short_bytes_compl_names, short_ldst_compl_names, signed_unsigned_names, source, status, unit_cond_64_names, unit_cond_names, UT64_MAX, and wide_add_cond_names.
Referenced by disassemble().
int print_insn_i370 | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_i386 | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_i386_att | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_i386_intel | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_i860 | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_i960 | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_ia64 | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_ip2k | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_iq2000 | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_lanai | ( | bfd_vma | memaddr, |
disassemble_info * | info | ||
) |
Definition at line 106 of file lanai-dis.c.
References lanai_opcode::args, bfd_getb32(), compare_opcodes(), CONST, dis_branch, dis_condbranch, dis_dref, dis_jsr, dis_nonbranch, dis_noninsn, F_BR, F_CONDBR, F_DATA_SIZE, F_JSR, F_UNBR, benchmark::FILE, lanai_opcode::flags, i, imm, info(), is_delayed_branch(), L3_RI_H, L3_RRR_F, lanai_opcodes, lanai_opcode::lose, lanai_opcode::match, lanai_opcode::name, NUMOPCODES, op_names, opcodes_sorted, qsort(), reg, s, SIGN_EXT, status, X_C10, X_C16, X_C21, X_C25, X_OP1, X_OP2, X_RD, X_RS1, X_RS2, and X_RS3.
Referenced by disassemble().
int print_insn_little_arm | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_little_mips | ( | bfd_vma | memaddr, |
disassemble_info * | info | ||
) |
Definition at line 2104 of file mips-dis.c.
References _print_insn_mips(), BFD_ENDIAN_LITTLE, and info().
Referenced by disassemble().
int print_insn_little_nios2 | ( | bfd_vma | address, |
disassemble_info * | info | ||
) |
Definition at line 428 of file nios2-dis.c.
References BFD_ENDIAN_LITTLE, info(), and print_insn_nios2().
int print_insn_little_powerpc | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_little_score | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_lm32 | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_m32c | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_m32r | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_m68hc11 | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_m68hc12 | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_m68k | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_m88k | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_m9s12x | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_m9s12xg | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_mcore | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_mep | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_metag | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_microblaze | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_mmix | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_mn10200 | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_mn10300 | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_moxie | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_msp430 | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_mt | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_nds32 | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_ns32k | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_or1k | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_pdp11 | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_pj | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_pru | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_riscv | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_rl78 | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_rl78_g10 | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_rl78_g13 | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_rl78_g14 | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_rs6000 | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_rx | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_s390 | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_sh | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_sh64 | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_sh64x_media | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_sparc | ( | bfd_vma | memaddr, |
disassemble_info * | info | ||
) |
Definition at line 480 of file sparc-dis.c.
References _, sparc_opcode::architecture, sparc_opcode::args, BFD_ENDIAN_BIG, bfd_getb32(), bfd_getl32(), bfd_mach_sparc_sparclite, bit, build_hash_table(), compare_opcodes(), compute_arch_mask(), creg, current_arch_mask, dis_branch, dis_condbranch, dis_dref, dis_jsr, dis_nonbranch, dis_noninsn, F_CONDBR, F_DELAYED, F_JSR, F_UNBR, benchmark::FILE, sparc_opcode::flags, freg, fregx, HASH_INSN, i, imm, info(), is_delayed_branch(), sparc_opcode::lose, mask, sparc_opcode::match, name, sparc_opcode::name, op, sparc_opcode_hash::opcode, opcode_hash_table, qsort(), reg, s, SIGN_EXT, sorted_opcodes, sparc_decode_asi(), sparc_decode_membar(), sparc_decode_prefetch(), sparc_decode_sparclet_cpreg(), sparc_num_opcodes, sparc_opcodes, status, unsigned, v9_hpriv_reg_names, v9_priv_reg_names, v9a_asr_reg_names, val, X_ASI, X_DISP16, X_DISP19, X_DISP22, X_DISP30, X_IMM, X_IMM22, X_LDST_I, X_MEMBAR, X_RD, X_RS1, X_RS2, X_SIMM, and xmalloc.
Referenced by disassemble().
int print_insn_spu | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_tic30 | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_tic4x | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_tic54x | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_tic6x | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_tic80 | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_tilegx | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_tilepro | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_tricore | ( | bfd_vma | memaddr, |
struct disassemble_info * | info | ||
) |
Definition at line 1884 of file tricore-dis.c.
References bfd_getl16(), bfd_getl32(), bfd_mach_rider_2, bfd_mach_rider_a, bfd_mach_rider_b, bfd_mach_rider_mask, current_isa, decode_pcp_insn(), decode_tricore_insn(), info(), init_hash_tables(), initialized, memset(), SEC_ARCH_BIT_0, tricore_init_arch_vars(), TRICORE_RIDER_A, TRICORE_RIDER_B, and TRICORE_V2.
Referenced by disassemble().
int print_insn_v850 | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_vax | ( | bfd_vma | memaddr, |
disassemble_info * | info | ||
) |
Definition at line 290 of file vax-dis.c.
References arg(), argp, vot_wot::args, private::bailout, vot_wot::code, vot::detail, FETCH_DATA, info(), private::insn_start, private::max_fetched, vot::name, NULL, print_insn_arg(), private::the_buffer, vax_opcodeT, and votstrs.
Referenced by disassemble().
int print_insn_visium | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_w65 | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_xc16x | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_xgate | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_xstormy16 | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_xtensa | ( | bfd_vma | memaddr, |
disassemble_info * | info | ||
) |
Definition at line 158 of file xtensa-dis.c.
References dis_private::bailout, dis_private::byte_buf, fetch_data(), i, info(), MAX, memset(), n, NULL, opc, OPCODES_SIGSETJMP, print_xtensa_operand(), xmalloc, xtensa_default_isa, xtensa_format_decode(), xtensa_format_get_slot(), xtensa_format_length(), xtensa_format_num_slots(), xtensa_insnbuf_alloc(), xtensa_insnbuf_from_chars(), xtensa_insnbuf_size(), xtensa_isa_init(), xtensa_isa_maxlength(), xtensa_opcode_decode(), xtensa_opcode_name(), xtensa_opcode_num_operands(), xtensa_operand_get_field(), xtensa_operand_is_visible(), and XTENSA_UNDEFINED.
Referenced by disassemble().
int print_insn_z80 | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_z8001 | ( | bfd_vma | , |
disassemble_info * | |||
) |
int print_insn_z8002 | ( | bfd_vma | , |
disassemble_info * | |||
) |
void print_mips_disassembler_options | ( | FILE * | stream | ) |
Definition at line 2110 of file mips-dis.c.
References _, ARRAY_SIZE, i, mips_abi_choices, and mips_arch_choices.
void print_ppc_disassembler_options | ( | FILE * | ) |
void print_riscv_disassembler_options | ( | FILE * | ) |
void print_s390_disassembler_options | ( | FILE * | ) |
char* remove_whitespace_and_extra_commas | ( | char * | ) |
disassembler_ftype rl78_get_disassembler | ( | bfd * | ) |