Rizin
unix-like reverse engineering framework and cli tools
|
#include <rz_core.h>
#include <rz_demangler.h>
#include <rz_types.h>
#include <rz_util.h>
#include <stdio.h>
#include <stdlib.h>
#include <rz_main.h>
#include "../../librz/bin/pdb/pdb_downloader.h"
Go to the source code of this file.
Macros | |
#define | STDIN_BUF_SIZE 96096 |
#define | is_active(x) (action & (x)) |
#define | set_action(x) |
#define | unset_action(x) action &= ~x |
#define | ismodejson (out_mode == RZ_MODE_JSON && actions > 0) |
#define | run_action(n, x, y) |
#define ismodejson (out_mode == RZ_MODE_JSON && actions > 0) |
#define STDIN_BUF_SIZE 96096 |
|
static |
Definition at line 418 of file rz-bin.c.
References bin::buf, free(), malloc(), output, printf(), r, rz_bin_get_sections(), rz_buf_read_at(), rz_buf_size(), rz_file_dump(), rz_hex_bin2str(), sections(), and section::size.
Referenced by rabin_do_operation().
|
static |
Definition at line 585 of file rz-bin.c.
References rz_bin_plugin_add(), and rz_bin_plugin_t::user.
Referenced by rz_main_rz_bin().
|
static |
Definition at line 592 of file rz-bin.c.
Referenced by rz_main_rz_bin().
|
static |
Definition at line 597 of file rz-bin.c.
References rz_bin_xtr_add().
Referenced by rz_main_rz_bin().
|
static |
Definition at line 605 of file rz-bin.c.
Referenced by rz_main_rz_bin().
|
static |
Definition at line 576 of file rz-bin.c.
References rz_demangler_plugin_add().
Referenced by rz_main_rz_bin().
|
static |
Definition at line 581 of file rz-bin.c.
Referenced by rz_main_rz_bin().
Definition at line 609 of file rz-bin.c.
References printf(), rz_bin_list_plugin(), rz_cmd_state_output_fini(), rz_cmd_state_output_init(), rz_cmd_state_output_print(), rz_cons_flush(), rz_core_bin_plugins_print(), RZ_MODE_JSON, RZ_OUTPUT_MODE_JSON, RZ_OUTPUT_MODE_QUIET, and RZ_OUTPUT_MODE_STANDARD.
Referenced by rz_main_rz_bin().
|
static |
Definition at line 260 of file rz-bin.c.
References free(), setup::line, sdb_query(), and stdin_gets().
Referenced by rz_main_rz_bin().
Definition at line 79 of file rz-bin.c.
References test-lz4-speed::action, RZ_BIN_REQ_BASEFIND, RZ_BIN_REQ_CLASSES, RZ_BIN_REQ_DWARF, RZ_BIN_REQ_ENTRIES, RZ_BIN_REQ_EXPORTS, RZ_BIN_REQ_FIELDS, RZ_BIN_REQ_HEADER, RZ_BIN_REQ_IMPORTS, RZ_BIN_REQ_INFO, RZ_BIN_REQ_INITFINI, RZ_BIN_REQ_LIBS, RZ_BIN_REQ_MAIN, RZ_BIN_REQ_PDB, RZ_BIN_REQ_RELOCS, RZ_BIN_REQ_RESOURCES, RZ_BIN_REQ_SECTIONS, RZ_BIN_REQ_SECTIONS_MAPPING, RZ_BIN_REQ_SEGMENTS, RZ_BIN_REQ_SIGNATURE, RZ_BIN_REQ_SIZE, RZ_BIN_REQ_STRINGS, RZ_BIN_REQ_SYMBOLS, and RZ_BIN_REQ_VERSIONINFO.
Referenced by rz_main_rz_bin().
|
static |
Definition at line 29 of file rz-bin.c.
References rz_cmd_state_output_t::d, free(), rz_cmd_state_output_t::pj, pj_raw(), pj_string(), rz_cmd_state_output_free(), rz_cons_printf(), RZ_OUTPUT_MODE_JSON, RZ_OUTPUT_MODE_TABLE, rz_table_tostring(), and s.
Referenced by rz_main_rz_bin().
|
static |
Definition at line 45 of file rz-bin.c.
References rz_cmd_state_output_t::d, header, rz_cmd_state_output_t::pj, pj_k(), rz_cmd_state_output_init(), rz_cons_printf(), RZ_NEW, RZ_OUTPUT_MODE_JSON, RZ_OUTPUT_MODE_STANDARD, RZ_OUTPUT_MODE_TABLE, and toupper.
Referenced by rz_main_rz_bin().
|
static |
Definition at line 56 of file rz-bin.c.
References rz_core_t::bin, NULL, rz_bin_cur(), and rz_core_bin_class_as_source_print().
Referenced by rz_main_rz_bin().
|
static |
Definition at line 19 of file rz-bin.c.
References pj_end(), pj_string(), rz_cons_printf(), RZ_OUTPUT_MODE_JSON, and s.
Referenced by rz_main_rz_bin().
|
static |
Definition at line 284 of file rz-bin.c.
References rz_bin_xtr_metadata_t::arch, arch, rz_bin_xtr_metadata_t::bits, bits(), rz_bin_xtr_extract_t::buf, bytes, eprintf, rz_bin_file_t::file, free(), setup::idx, rz_bin_xtr_metadata_t::libname, malloc(), rz_bin_xtr_extract_t::metadata, NULL, outfile, path, PFMT64d, printf(), rz_buf_read_at(), rz_file_basename(), rz_file_dump(), rz_str_newf(), rz_sys_mkdirp(), rz_bin_file_t::size, rz_bin_xtr_extract_t::size, strdup(), ut64(), and rz_bin_xtr_metadata_t::xtr_type.
Referenced by rabin_extract().
|
static |
Definition at line 632 of file rz-bin.c.
References rz_demangler_plugin_t::author, rz_demangler_plugin_t::language, rz_demangler_plugin_t::license, and printf().
Referenced by rz_main_rz_bin().
|
static |
Definition at line 638 of file rz-bin.c.
References rz_bin_string_t::length, rz_bin_file_t::o, rz_bin_string_t::ordinal, rz_bin_string_t::paddr, PFMT64x, pj_end(), pj_kn(), pj_ks(), pj_o(), printf(), rz_bin_get_section_at(), rz_bin_object_get_vaddr(), RZ_MODE_JSON, RZ_MODE_PRINT, RZ_MODE_SIMPLE, RZ_MODE_SIMPLEST, rz_return_if_fail, rz_str_enc_as_string(), rz_warn_if_reached, s, rz_bin_string_t::size, rz_bin_string_t::string, rz_bin_string_t::type, ut64(), UT64_MAX, and rz_bin_string_t::vaddr.
Referenced by rz_main_rz_bin().
|
static |
Definition at line 471 of file rz-bin.c.
References __dumpSections(), a, rz_bin_file_load_options_t::baseaddr, rz_bin_file_t::buf, eprintf, error(), file, free(), rz_bin_xtr_extract_t::loaded, NULL, output, rabin_dump_symbols(), rz_bin_cur(), rz_bin_file_cur_plugin(), rz_bin_file_object_new_from_xtr_data(), rz_bin_get_laddr(), rz_buf_free(), rz_buf_new_with_buf(), rz_cons_flush(), rz_cons_println(), rz_list_get_n(), RZ_MODE_JSON, rz_num_math(), rz_bin_plugin_t::signature, strdup(), ut64(), UT64_MAX, and rz_bin_file_t::xtr_data.
Referenced by rz_main_rz_bin().
Definition at line 380 of file rz-bin.c.
References bin::buf, calloc(), eprintf, free(), len, malloc(), rz_bin_symbol_t::name, rz_bin_symbol_t::paddr, printf(), rz_bin_get_symbols(), rz_buf_read_at(), rz_hex_bin2str(), rz_bin_symbol_t::size, and symbols().
Referenced by rabin_do_operation().
Definition at line 353 of file rz-bin.c.
References test_group_name::all, extract_binobj(), setup::idx, NULL, rz_bin_cur(), rz_list_get_n(), and rz_bin_file_t::xtr_data.
Referenced by rz_main_rz_bin().
Definition at line 565 of file rz-bin.c.
References free(), printf(), rz_bin_addr2text(), and UT64_MAX.
Referenced by rz_main_rz_bin().
|
static |
Definition at line 63 of file rz-bin.c.
References RZ_MODE_JSON, RZ_MODE_PRINT, RZ_MODE_RIZINCMD, RZ_MODE_SIMPLE, RZ_MODE_SIMPLEST, RZ_OUTPUT_MODE_JSON, RZ_OUTPUT_MODE_QUIET, RZ_OUTPUT_MODE_QUIETEST, RZ_OUTPUT_MODE_RIZIN, and RZ_OUTPUT_MODE_STANDARD.
Referenced by rz_main_rz_bin().
Definition at line 681 of file rz-bin.c.
References __lib_bin_cb(), __lib_bin_dt(), __lib_bin_xtr_cb(), __lib_bin_xtr_dt(), __lib_demangler_cb(), __lib_demangler_dt(), __listPlugins(), __sdb_prompt(), test-lz4-speed::action, actions2mask(), add_footer(), add_header(), addr, arch, rz_getopt_t::arg, argv, b, baddr(), rz_core_t::bin, bits(), c, classes_as_source_print(), rz_core_t::config, rz_cons_t::context, create(), end_state(), eprintf, err, SPDBOptions::extract, fd, fh, filter(), free(), rz_getopt_t::ind, rz_core_t::io, is_active, rz_cons_context_t::is_interactive, isBinopHelp(), ismodejson, list(), malloc(), mask, name, NULL, output, p, path, PFMT64d, PFMT64x, pj_a(), pj_end(), pj_free(), pj_new(), pj_string(), print_demangler_info(), print_string(), printf(), rabin_do_operation(), rabin_extract(), rabin_show_help(), rabin_show_srcline(), rad2outputmode(), run_action, rz_bin_arch_options_init(), rz_bin_create(), rz_bin_file_strings(), rz_bin_force_plugin(), rz_bin_load_filter(), rz_bin_open(), rz_bin_options_init(), rz_bin_pdb_download(), RZ_BIN_REQ_BASEFIND, RZ_BIN_REQ_CLASSES, RZ_BIN_REQ_CLASSES_SOURCES, RZ_BIN_REQ_CREATE, RZ_BIN_REQ_DLOPEN, RZ_BIN_REQ_DWARF, RZ_BIN_REQ_ENTRIES, RZ_BIN_REQ_EXPORTS, RZ_BIN_REQ_EXTRACT, RZ_BIN_REQ_FIELDS, RZ_BIN_REQ_HELP, RZ_BIN_REQ_IMPORTS, RZ_BIN_REQ_INFO, RZ_BIN_REQ_INITFINI, RZ_BIN_REQ_LIBS, RZ_BIN_REQ_LISTARCHS, RZ_BIN_REQ_LISTPLUGINS, RZ_BIN_REQ_MAIN, RZ_BIN_REQ_OPERATION, RZ_BIN_REQ_PDB, RZ_BIN_REQ_PDB_DWNLD, RZ_BIN_REQ_RELOCS, RZ_BIN_REQ_RESOURCES, RZ_BIN_REQ_SECTIONS, RZ_BIN_REQ_SECTIONS_MAPPING, RZ_BIN_REQ_SEGMENTS, RZ_BIN_REQ_SIGNATURE, RZ_BIN_REQ_SIZE, RZ_BIN_REQ_SRCLINE, RZ_BIN_REQ_STRINGS, RZ_BIN_REQ_SYMBOLS, RZ_BIN_REQ_TRYCATCH, RZ_BIN_REQ_UNK, RZ_BIN_REQ_VERSIONINFO, rz_bin_select(), rz_bin_set_baddr(), rz_buf_data(), rz_buf_free(), rz_cmd_state_output_fini(), rz_cmd_state_output_init(), rz_config_get(), rz_config_get_b(), rz_config_get_i(), rz_config_set(), rz_config_unserialize(), rz_cons_flush(), rz_cons_new(), rz_cons_printf(), rz_cons_println(), rz_core_bin_archs_print(), rz_core_bin_export_info(), rz_core_bin_print(), rz_core_bin_update_arch_bits(), rz_core_file_close(), rz_core_file_open(), rz_core_fini(), rz_core_init(), rz_demangler_plugin_demangle, rz_demangler_plugin_get(), rz_demangler_plugin_iterate(), rz_file_chmod(), rz_file_dump(), RZ_FREE, rz_getopt_init(), rz_getopt_next(), rz_hex_str2bin(), RZ_HOME_OLD_PLUGINS, rz_io_fd_get_current(), rz_lib_add_handler(), rz_lib_dl_close(), rz_lib_dl_open(), RZ_LIB_ENV, rz_lib_free(), rz_lib_new(), rz_lib_opendir(), RZ_LIB_TYPE_BIN, RZ_LIB_TYPE_BIN_XTR, RZ_LIB_TYPE_DEMANGLER, rz_list_free(), rz_main_version_print(), RZ_MODE_JSON, RZ_MODE_PRINT, RZ_MODE_RIZINCMD, RZ_MODE_SIMPLE, RZ_MODE_SIMPLEST, rz_num_math(), RZ_OUTPUT_MODE_JSON, RZ_OUTPUT_MODE_STANDARD, RZ_OUTPUT_MODE_TABLE, rz_path_home_prefix(), rz_path_system(), RZ_PERM_R, RZ_PLUGINS, RZ_STR_ISEMPTY, RZ_STR_ISNOTEMPTY, rz_str_split_duplist_n(), rz_sys_fork(), rz_sys_getenv(), rz_sys_setenv(), sdb_free(), sdb_new(), sdb_query(), set_action, start_state(), stdin_gets(), strdup(), SPDBOptions::symbol_server, SPDBOptions::symbol_store_path, autogen_x86imm::tmp, unset_action, ut64(), UT64_MAX, rz_io_t::va, and rz_bin_file_t::xtr_data.
Referenced by MAIN_NAME(), and rz_main_rizin().
|
static |
Definition at line 13 of file rz-bin.c.
References pj_o(), and RZ_OUTPUT_MODE_JSON.
Referenced by parser__reductions_after_sequence(), and rz_main_rz_bin().
|
static |
Definition at line 235 of file rz-bin.c.
References free(), malloc(), memset(), NULL, STDIN_BUF_SIZE, and strdup().
Referenced by __sdb_prompt(), and rz_main_rz_bin().