5 #include "../core_private.h"
12 for (
i = 0;
i <
len;
i += ws) {
17 char ch = (
v0.v64 ==
v1.v64) ?
'=' :
'!';
29 (
ut32)(
v0.v8 & 0xff), ch, (
ut32)(
v1.v8 & 0xff), colorEnd);
33 v0.v16, ch,
v1.v16, colorEnd);
37 v0.v32, ch,
v1.v32, colorEnd);
49 int i,
min = 1, inc = 16;
54 for (
i = 0;
i <
cmp->len;
i += inc) {
77 const char *color_end = scr_color ?
Color_RESET :
"";
80 const char *extra =
rz_str_pad(
' ', strlen(
n) - 10);
88 for (
i = 7;
i >= 0;
i--) {
89 bool b0 = (
cmp->data1[0] & 1 <<
i) ? 1 : 0;
90 bool b1 = (
cmp->data2[0] & 1 <<
i) ? 1 : 0;
100 for (
i = 7;
i >= 0;
i--) {
101 bool b0 = (
cmp->data1[0] & 1 <<
i) ? 1 : 0;
102 bool b1 = (
cmp->data2[0] & 1 <<
i) ? 1 : 0;
159 RZ_LOG_ERROR(
"Cannot compare more than 8 bytes. Use the c command instead.\n");
324 for (
int i = 0;
i < ret * 2;
i++) {
static RzILOpEffect * cmp(cs_insn *insn, bool is_thumb)
RZ_IPI RzCmdStatus rz_cmd_cmp_bytes_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_cmd_cmp_add_memory_watcher_handler(RzCore *core, int argc, const char **argv)
static int rizin_compare_words(RzCore *core, ut64 of, ut64 od, int len, int ws)
RZ_IPI RzCmdStatus rz_cmd_cmp_hex_block_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_cmp_file_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_cmd_cmp_unified1_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_cmp_unified_disasm_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_cmp_remove_watcher_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_cmp_list_compare_watchers_handler(RzCore *core, int argc, const char **argv, RzOutputMode mode)
RZ_IPI RzCmdStatus rz_cmd_cmp_unified4_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_cmp_hex_diff_lines_handler(RzCore *core, int argc, const char **argv)
static bool rizin_compare_unified(RzCore *core, RzCompareData *cmp)
RZ_IPI RzCmdStatus rz_cmd_cmp_reset_watcher_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_cmp_bits_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_cmp_string_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_cmd_cmp_disasm_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_cmp_unified2_handler(RzCore *core, int argc, const char **argv)
static bool core_cmp_bits(RzCore *core, RzCompareData *cmp)
RZ_IPI RzCmdStatus rz_cmd_cmp_hex_block_hexdiff_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_cmd_cmp_hexpair_string_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_cmd_cmp_update_watcher_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_cmp_addr_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_cmd_cmp_unified_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_cmd_cmp_unified8_handler(RzCore *core, int argc, const char **argv)
RZ_API bool rz_core_cmp_disasm_print(RzCore *core, const RzList *compare, bool unified)
Print the instruction comparison data compare.
RZ_API void rz_core_cmp_free(RzCompareData *cmp)
Free RzCompareData object.
RZ_API RZ_OWN RzList * rz_core_cmp_disasm(RzCore *core, ut64 addr1, ut64 addr2, ut32 len)
Compare the instructions at addr1 and addr2.
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.
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.
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.
RZ_API ut64 rz_config_get_i(RzConfig *cfg, RZ_NONNULL const char *name)
RZ_API RzCons * rz_cons_singleton(void)
RZ_API void rz_cons_newline(void)
RZ_API int rz_cons_printf(const char *format,...)
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)
RZ_API void rz_core_cmpwatch_show(RzCore *core, ut64 addr, RzOutputMode mode)
Show/print the memory watcher present at address addr.
RZ_API bool rz_core_cmpwatch_update(RzCore *core, ut64 addr)
Update the memory watcher at address addr.
RZ_API bool rz_core_cmpwatch_del(RzCore *core, ut64 addr)
Delete a memory watcher at address addr.
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.
RZ_API bool rz_core_cmpwatch_revert(RzCore *core, ut64 addr)
Revert/reset a memory watcher at address addr.
RZ_API void Ht_() free(HtName_(Ht) *ht)
return memset(p, 0, total)
RZ_API void rz_list_free(RZ_NONNULL RzList *list)
Empties the list and frees the list pointer.
void * malloc(size_t size)
static static fork const void static count static fd const char const char static newpath char char char static envp time_t static t const char static mode static whence const char static dir time_t static t unsigned static seconds const char struct utimbuf static buf static inc static sig const char static mode static oldfd struct tms static buf static getgid static geteuid const char static filename static arg static mask struct ustat static ubuf static getppid static setsid static egid sigset_t static set struct timeval struct timezone static tz fd_set fd_set fd_set struct timeval static timeout const char char static bufsiz const char static swapflags void static offset const char static length static mode static who const char struct statfs static buf unsigned unsigned num
static static fork const void static count static fd const char const char static newpath char char argv
return strdup("=SP r13\n" "=LR r14\n" "=PC r15\n" "=A0 r0\n" "=A1 r1\n" "=A2 r2\n" "=A3 r3\n" "=ZF zf\n" "=SF nf\n" "=OF vf\n" "=CF cf\n" "=SN or0\n" "gpr lr .32 56 0\n" "gpr pc .32 60 0\n" "gpr cpsr .32 64 0 ____tfiae_________________qvczn\n" "gpr or0 .32 68 0\n" "gpr tf .1 64.5 0 thumb\n" "gpr ef .1 64.9 0 endian\n" "gpr jf .1 64.24 0 java\n" "gpr qf .1 64.27 0 sticky_overflow\n" "gpr vf .1 64.28 0 overflow\n" "gpr cf .1 64.29 0 carry\n" "gpr zf .1 64.30 0 zero\n" "gpr nf .1 64.31 0 negative\n" "gpr itc .4 64.10 0 if_then_count\n" "gpr gef .4 64.16 0 great_or_equal\n" "gpr r0 .32 0 0\n" "gpr r1 .32 4 0\n" "gpr r2 .32 8 0\n" "gpr r3 .32 12 0\n" "gpr r4 .32 16 0\n" "gpr r5 .32 20 0\n" "gpr r6 .32 24 0\n" "gpr r7 .32 28 0\n" "gpr r8 .32 32 0\n" "gpr r9 .32 36 0\n" "gpr r10 .32 40 0\n" "gpr r11 .32 44 0\n" "gpr r12 .32 48 0\n" "gpr r13 .32 52 0\n" "gpr r14 .32 56 0\n" "gpr r15 .32 60 0\n" "gpr r16 .32 64 0\n" "gpr r17 .32 68 0\n")
enum rz_cmd_status_t RzCmdStatus
@ RZ_CMD_STATUS_OK
command handler exited in the right way
@ RZ_CMD_STATUS_ERROR
command handler had issues while running (e.g. allocation error, etc.)
RZ_API int rz_hex_str2bin(const char *in, ut8 *out)
Convert an input string in into the binary form in out.
RZ_API int rz_hex_bin2str(const ut8 *in, int len, char *out)
RZ_API int rz_io_nread_at(RzIO *io, ut64 addr, ut8 *buf, int len)
#define RZ_LOG_ERROR(fmtstr,...)
RZ_API ut64 rz_num_math(RzNum *num, const char *str)
#define RZ_PRINT_FLAGS_DIFFOUT
#define RZ_PRINT_FLAGS_HEADER
RZ_API char * rz_str_newf(const char *fmt,...) RZ_PRINTF_CHECK(1
RZ_API const char * rz_str_pad(const char ch, int len)
RZ_API int rz_str_unescape(char *buf)
RZ_API void rz_str_remove_char(char *str, char c)
RZ_API FILE * rz_sys_fopen(const char *path, const char *mode)
RzOutputMode
Enum to describe the way data are printed.
Represent the output state of a command handler.
RzConsPrintablePalette pal
ut64(WINAPI *w32_GetEnabledXStateFeatures)()
static const z80_opcode fd[]
static bool input(void *ud, zip_uint8_t *data, zip_uint64_t length)