Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Classes | |
struct | RzCompareData |
struct | rz_core_cmpwatch_t |
Typedefs | |
typedef struct rz_core_cmpwatch_t | RzCoreCmpWatcher |
Functions | |
RZ_API RZ_OWN RzCompareData * | rz_core_cmp_mem_mem (RzCore *core, ut64 addr1, ut64 addr2, ut32 len) |
Compare memory at addr1 with the memory at addr2 . More... | |
RZ_API RZ_OWN RzCompareData * | rz_core_cmp_mem_data (RzCore *core, ut64 addr, RZ_NONNULL const ut8 *data, ut32 len) |
Compare mem at addr with data data . More... | |
RZ_API int | rz_core_cmp_print (RzCore *core, RZ_NONNULL const RzCompareData *cmp, RzCmdStateOutput *state) |
Print a comparison cmp according to the print mode mode . More... | |
RZ_API RZ_OWN RzList * | rz_core_cmp_disasm (RzCore *core, ut64 addr1, ut64 addr2, ut32 len) |
Compare the instructions at addr1 and addr2 . More... | |
RZ_API void | rz_core_cmp_free (RzCompareData *cmp) |
Free RzCompareData object. More... | |
RZ_API bool | rz_core_cmp_disasm_print (RzCore *core, const RzList *compare, bool unified) |
Print the instruction comparison data compare . More... | |
RZ_API void | rz_core_cmpwatch_free (RzCoreCmpWatcher *w) |
RZ_API RzCoreCmpWatcher * | rz_core_cmpwatch_get (RzCore *core, ut64 addr) |
Get the memory watcher at address addr . More... | |
RZ_API bool | rz_core_cmpwatch_add (RzCore *core, ut64 addr, int size, const char *cmd) |
Add a memory watcher at address addr od size size and command cmd . More... | |
RZ_API bool | rz_core_cmpwatch_del (RzCore *core, ut64 addr) |
Delete a memory watcher at address addr . More... | |
RZ_API bool | rz_core_cmpwatch_update (RzCore *core, ut64 addr) |
Update the memory watcher at address addr . More... | |
RZ_API void | rz_core_cmpwatch_show (RzCore *core, ut64 addr, RzOutputMode mode) |
Show/print the memory watcher present at address addr . More... | |
RZ_API bool | rz_core_cmpwatch_revert (RzCore *core, ut64 addr) |
Revert/reset a memory watcher at address addr . More... | |
typedef struct rz_core_cmpwatch_t RzCoreCmpWatcher |
Compare the instructions at addr1
and addr2
.
core | Current RzCore instance |
addr1 | address to read instructions from |
addr2 | address to read instructions from |
len | number of bytes to read instructions from |
Definition at line 161 of file cmp.c.
References RzCompareData::addr1, RzCompareData::addr2, rz_core_t::block, rz_asm_op_t::buf_asm, calloc(), RzCompareData::data1, RzCompareData::data2, rz_list_t::free, free(), i, rz_core_t::io, len, RzCompareData::len, NULL, op, rz_core_t::rasm, rz_asm_disassemble(), rz_asm_set_pc(), rz_core_cmp_free(), rz_io_nread_at(), rz_list_append(), rz_list_free(), rz_list_new(), RZ_NEW0, rz_return_val_if_fail, rz_strbuf_get(), RzCompareData::same, rz_asm_op_t::size, strdup(), and UT8_MAX.
Referenced by rz_cmd_cmp_disasm_handler(), and rz_cmd_cmp_unified_disasm_handler().
Print the instruction comparison data compare
.
core | Current RzCore instance |
compare | list of RzCompareData of instructions |
unified | print in unified form |
Definition at line 243 of file cmp.c.
References cmp(), Color_RESET, compare(), rz_core_t::config, rz_cons_t::context, rz_cons_printable_palette_t::graph_false, rz_cons_printable_palette_t::graph_true, memset(), rz_cons_context_t::pal, PFMT64x, pos, rz_config_get_i(), rz_cons_printf(), rz_cons_singleton(), and rz_return_val_if_fail.
Referenced by rz_cmd_cmp_disasm_handler(), and rz_cmd_cmp_unified_disasm_handler().
RZ_API void rz_core_cmp_free | ( | RzCompareData * | cmp | ) |
Free RzCompareData object.
cmp | RzCompareData object to be freed |
Definition at line 226 of file cmp.c.
References cmp(), free(), and RZ_FREE.
Referenced by rz_cmd_cmp_addr_handler(), rz_cmd_cmp_bits_handler(), rz_cmd_cmp_bytes_handler(), rz_cmd_cmp_file_handler(), rz_cmd_cmp_hex_block_hexdiff_handler(), rz_cmd_cmp_hexpair_string_handler(), rz_cmd_cmp_string_handler(), rz_cmd_cmp_unified_handler(), and rz_core_cmp_disasm().
RZ_API RZ_OWN RzCompareData* rz_core_cmp_mem_data | ( | RzCore * | core, |
ut64 | addr, | ||
RZ_NONNULL const ut8 * | data, | ||
ut32 | len | ||
) |
Compare mem at addr
with data data
.
core | Current RzCore instance |
addr | address to read data from |
data | Data to be compared |
len | Number of bytes to compare |
Definition at line 56 of file cmp.c.
References addr, cmp(), free(), rz_core_t::io, len, malloc(), NULL, PFMT64x, rz_io_nread_at(), RZ_LOG_ERROR, rz_mem_dup(), rz_mem_eq(), RZ_NEW0, rz_return_val_if_fail, and UT64_MAX.
Referenced by rz_cmd_cmp_bytes_handler(), rz_cmd_cmp_file_handler(), rz_cmd_cmp_hex_block_hexdiff_handler(), rz_cmd_cmp_hexpair_string_handler(), and rz_cmd_cmp_string_handler().
RZ_API RZ_OWN RzCompareData* rz_core_cmp_mem_mem | ( | RzCore * | core, |
ut64 | addr1, | ||
ut64 | addr2, | ||
ut32 | len | ||
) |
Compare memory at addr1
with the memory at addr2
.
core | Current RzCore instance |
addr1 | address to read data from |
addr2 | address to read data from |
len | Number of bytes to compare |
Definition at line 17 of file cmp.c.
References buf2, cmp(), free(), rz_core_t::io, len, malloc(), NULL, PFMT64x, rz_io_nread_at(), RZ_LOG_ERROR, rz_mem_eq(), RZ_NEW0, and rz_return_val_if_fail.
Referenced by rz_cmd_cmp_addr_handler(), rz_cmd_cmp_bits_handler(), and rz_cmd_cmp_unified_handler().
RZ_API int rz_core_cmp_print | ( | RzCore * | core, |
RZ_NONNULL const RzCompareData * | cmp, | ||
RzCmdStateOutput * | state | ||
) |
Print a comparison cmp
according to the print mode mode
.
core | Current RzCore instance |
cmp | RzCompareData instance to be printed |
state | RzCmdStateOutput to be used (options: standard, json) (NULL means standard) |
Definition at line 93 of file cmp.c.
References cmp(), eq, i, IS_PRINTABLE, NULL, PFMT64x, pj_a(), pj_end(), pj_k(), pj_ki(), pj_kn(), pj_o(), rz_cons_printf(), RZ_OUTPUT_MODE_JSON, RZ_OUTPUT_MODE_STANDARD, rz_return_val_if_fail, rz_warn_if_reached, UT64_MAX, and UT8_MAX.
Referenced by rz_cmd_cmp_addr_handler(), rz_cmd_cmp_bytes_handler(), rz_cmd_cmp_file_handler(), rz_cmd_cmp_hex_block_hexdiff_handler(), rz_cmd_cmp_hexpair_string_handler(), and rz_cmd_cmp_string_handler().