Rizin
unix-like reverse engineering framework and cli tools
|
#include <rz_core.h>
Go to the source code of this file.
Macros | |
#define | STRING_CHUNK 16 |
Definition at line 255 of file cprint.c.
References addr, rz_core_t::blocksize_max, int, len, PFMT32x, RZ_ABS, and RZ_LOG_ERROR.
Referenced by rz_core_print_dump_str(), rz_core_print_hexdump_byline_str(), and rz_core_print_hexdump_or_hexdiff_str().
Get the assembly of the hexstr.
core | RzCore |
hex | hex |
len | length of hex |
Definition at line 109 of file cprint.c.
References rz_asm_code_t::assembly, hex, len, NULL, rz_core_t::offset, rz_core_t::rasm, rz_asm_code_free(), rz_asm_mdisassemble(), rz_asm_set_pc(), RZ_LOG_ERROR, rz_strbuf_append(), rz_strbuf_drain(), rz_strbuf_free(), and rz_strbuf_new().
Referenced by rz_assembly_of_hex_handler().
Get the esil of the assembly.
core | RzCore |
assembly | assembly |
Definition at line 68 of file cprint.c.
References rz_core_t::analysis, rz_asm_code_t::bytes, rz_analysis_op_t::esil, rz_asm_code_t::len, NULL, rz_core_t::offset, rz_core_t::rasm, rz_analysis_op(), rz_analysis_op_fini(), RZ_ANALYSIS_OP_MASK_ESIL, rz_asm_code_free(), rz_asm_massemble(), rz_asm_set_pc(), RZ_LOG_ERROR, rz_strbuf_appendf(), rz_strbuf_drain(), rz_strbuf_free(), rz_strbuf_new(), RZ_STRBUF_SAFEGET, and rz_analysis_op_t::size.
Referenced by rz_esil_of_assembly_handler().
Get the esil of the hexstr.
core | RzCore |
hex | hex |
len | length of hex |
Definition at line 134 of file cprint.c.
References rz_core_t::analysis, rz_analysis_op_t::esil, fail, hex, len, NULL, rz_core_t::offset, rz_analysis_op(), rz_analysis_op_fini(), RZ_ANALYSIS_OP_MASK_ESIL, RZ_LOG_ERROR, rz_strbuf_appendf(), rz_strbuf_drain(), rz_strbuf_free(), rz_strbuf_new(), RZ_STRBUF_SAFEGET, and rz_analysis_op_t::size.
Referenced by rz_esil_of_hex_handler().
Get the hexpair of the assembly.
core | RzCore |
assembly | assembly |
Definition at line 41 of file cprint.c.
References b, rz_asm_code_t::bytes, i, rz_asm_code_t::len, NULL, rz_core_t::offset, rz_core_t::rasm, rz_asm_code_free(), rz_asm_massemble(), rz_asm_set_pc(), RZ_LOG_ERROR, rz_strbuf_appendf(), rz_strbuf_drain(), rz_strbuf_free(), and rz_strbuf_new().
Referenced by rz_hex_of_assembly_handler().
RZ_IPI bool rz_core_print_dump | ( | RZ_NONNULL RzCore * | core, |
RzOutputMode | mode, | ||
ut64 | addr, | ||
ut8 | n, | ||
int | len, | ||
RzCorePrintFormatType | format | ||
) |
Definition at line 322 of file cprint.c.
References addr, len, n, PFMT64x, rz_core_print_dump_str(), and RZ_LOG_ERROR.
Referenced by rz_print_hexdump_hex_common_handler(), rz_print_hexdump_oct_handler(), and rz_print_hexdump_signed_integer_common_handler().
RZ_API char* rz_core_print_dump_str | ( | RZ_NONNULL RzCore * | core, |
RzOutputMode | mode, | ||
ut64 | addr, | ||
ut8 | n, | ||
int | len, | ||
RzCorePrintFormatType | format | ||
) |
Print dump at addr
.
n | Word size by bytes (1,2,4,8) |
len | Dump bytes length |
format | Print format, such as RZ_CORE_PRINT_FORMAT_TYPE_HEXADECIMAL |
Definition at line 281 of file cprint.c.
References addr, fix_size_from_format(), format_type_to_base(), free(), len, len_fixup(), malloc(), n, NULL, rz_io_read_at(), RZ_OUTPUT_MODE_JSON, RZ_OUTPUT_MODE_STANDARD, rz_print_hexdump_str(), rz_print_init_rowoffsets(), rz_print_jsondump_str(), rz_return_val_if_fail, rz_warn_if_reached, st8, and rz_print_t::use_comments.
Referenced by rz_core_print_dump().
RZ_IPI void rz_core_print_hexdiff | ( | RZ_NONNULL RzCore * | core, |
ut64 | aa, | ||
RZ_NONNULL const ut8 * | _a, | ||
ut64 | ba, | ||
RZ_NONNULL const ut8 * | _b, | ||
int | len, | ||
int | scndcol | ||
) |
Definition at line 182 of file cprint.c.
References free(), len, PFMT64x, RZ_LOG_ERROR, and rz_print_hexdiff_str().
Referenced by rizin_compare_unified(), rz_cmd_cmp_hex_block_handler(), and rz_cmd_cmp_hex_diff_lines_handler().
RZ_IPI void rz_core_print_hexdump | ( | RZ_NONNULL RzCore * | core, |
ut64 | addr, | ||
RZ_NONNULL const ut8 * | buf, | ||
int | len, | ||
int | base, | ||
int | step, | ||
size_t | zoomsz | ||
) |
Definition at line 161 of file cprint.c.
References addr, free(), len, PFMT64x, RZ_LOG_ERROR, rz_print_hexdump_str(), and step().
Referenced by cmd_print_op(), ds_print_meta_infos(), print_heap_chunk(), rz_cmd_heap_chunks_print_handler(), rz_core_disasm_pdi_with_buf(), rz_core_yank_print_hexdump(), rz_print_hexdump_hexless_bytes_handler(), rz_print_hexdump_hexless_words_handler(), rz_print_hexdump_sparse_handler(), rz_reg_arenas_hexdump_handler(), and search_collisions().
RZ_IPI bool rz_core_print_hexdump_byline | ( | RZ_NONNULL RzCore * | core, |
bool | hexoffset, | ||
ut64 | addr, | ||
int | len, | ||
ut8 | size | ||
) |
Definition at line 466 of file cprint.c.
References addr, free(), len, PFMT64x, rz_core_print_hexdump_byline_str(), and RZ_LOG_ERROR.
Referenced by rz_print_hexdump_hexl_common_handler().
RZ_API RZ_OWN char* rz_core_print_hexdump_byline_str | ( | RZ_NONNULL RzCore * | core, |
bool | hex_offset, | ||
ut64 | addr, | ||
int | len, | ||
ut8 | size | ||
) |
Hexdump at addr
.
len | Dump bytes length |
size | Word size by bytes (1,2,4,8) |
Definition at line 406 of file cprint.c.
References a, addr, b, Color_RESET, delta, f, fn, free(), i, len, len_fixup(), malloc(), NULL, p, PFMT64d, PFMT64x, rz_flag_get_at(), rz_io_read_at(), rz_print_section_str(), rz_read_ble(), rz_return_val_if_fail, rz_str_newf(), rz_strbuf_append(), rz_strbuf_appendf(), rz_strbuf_drain(), rz_strbuf_new(), sb, st64, strdup(), ut64(), ut64_to_hex(), and v.
Referenced by rz_core_print_hexdump_byline().
Definition at line 219 of file cprint.c.
References free(), len, PFMT64x, rz_core_print_hexdump_diff_str(), and RZ_LOG_ERROR.
RZ_API char* rz_core_print_hexdump_diff_str | ( | RZ_NONNULL RzCore * | core, |
ut64 | aa, | ||
ut64 | ba, | ||
ut64 | len | ||
) |
Print hexdump diff between aa
and ba
with len
.
Definition at line 195 of file cprint.c.
References a, b, free(), len, malloc(), NULL, PFMT64d, PFMT64x, rz_io_read_at(), RZ_LOG_VERBOSE, rz_print_hexdiff_str(), and rz_return_val_if_fail.
Referenced by rz_core_print_hexdump_diff(), and rz_core_print_hexdump_or_hexdiff_str().
RZ_IPI bool rz_core_print_hexdump_or_hexdiff | ( | RZ_NONNULL RzCore * | core, |
RZ_NULLABLE RzOutputMode | mode, | ||
ut64 | addr, | ||
int | len, | ||
bool | use_comment | ||
) |
Definition at line 378 of file cprint.c.
References addr, len, PFMT64x, rz_core_print_hexdump_or_hexdiff_str(), and RZ_LOG_ERROR.
RZ_API char* rz_core_print_hexdump_or_hexdiff_str | ( | RZ_NONNULL RzCore * | core, |
RzOutputMode | mode, | ||
ut64 | addr, | ||
int | len, | ||
bool | use_comment | ||
) |
Print hexdump at addr
, but maybe print hexdiff if (diff.from or diff.to),.
len | Dump bytes length |
Definition at line 337 of file cprint.c.
References addr, rz_print_t::flags, free(), from, len, len_fixup(), malloc(), NULL, rz_config_get_i(), rz_core_pava(), rz_core_print_hexdump_diff_str(), rz_io_read_at(), RZ_OUTPUT_MODE_JSON, RZ_OUTPUT_MODE_STANDARD, RZ_PRINT_FLAGS_COMMENT, rz_print_hexdump_str(), rz_print_jsondump_str(), rz_return_val_if_fail, rz_warn_if_reached, to, rz_print_t::use_comments, and ut64().
Referenced by rz_core_print_hexdump_or_hexdiff().
RZ_IPI void rz_core_print_jsondump | ( | RZ_NONNULL RzCore * | core, |
RZ_NONNULL const ut8 * | buf, | ||
int | len, | ||
int | wordsize | ||
) |
Definition at line 172 of file cprint.c.
References free(), len, RZ_LOG_ERROR, and rz_print_jsondump_str().
Return a C/C++ string defination with block size as the length
core | RzCore |
Definition at line 13 of file cprint.c.
References rz_core_t::block, rz_core_t::blocksize, NULL, PFMT64x, PFMTSZd, pos, RZ_LOG_ERROR, rz_read_ble(), rz_strbuf_append(), rz_strbuf_appendf(), rz_strbuf_drain(), rz_strbuf_new(), sb, STRING_CHUNK, ut64(), and value.
Referenced by rz_print_string_c_cpp_handler().
Definition at line 389 of file cprint.c.
References len, NULL, PFMT64x, rz_str_pad(), rz_strbuf_appendf(), rz_strbuf_drain(), rz_strbuf_length(), rz_strbuf_new(), rz_strbuf_prepend(), sb, width, and x.
Referenced by rz_core_print_hexdump_byline_str().