109 pj_k(pj,
"diff_bytes");
112 for (
i = 0;
i <
cmp->len;
i++) {
113 if (
cmp->data1[
i] ==
cmp->data2[
i]) {
130 pj_kn(pj,
"offset2", data_str ?
i :
cmp->addr2 +
i);
131 pj_ki(pj,
"rel_offset",
i);
149 return cmp->len -
eq;
178 for (
i = j = 0;
i <
len && j <
len;) {
198 comp->
addr2 = addr2 + j;
275 memset(colpad,
' ',
sizeof(colpad));
276 int pos = strlen((
char *)
cmp->data1);
283 cmp->addr1,
cmp->data1, colpad);
285 cmp->same ?
'=' :
'!',
cmp->addr2,
cmp->data2);
321 if (
addr ==
w->addr) {
406 int is_diff =
w->odata ? memcmp(
w->odata,
w->ndata,
w->size) : 0;
410 w->size,
w->cmd,
w->addr, is_diff ?
" # differs" :
"");
static RzILOpEffect * cmp(cs_insn *insn, bool is_thumb)
RZ_API int rz_asm_set_pc(RzAsm *a, ut64 pc)
RZ_API int rz_asm_disassemble(RzAsm *a, RzAsmOp *op, const ut8 *buf, int len)
RZ_API int rz_core_cmd0(RzCore *core, const char *cmd)
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 int rz_cons_printf(const char *format,...)
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags cmd
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 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.
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)
static int compare(const char *s1, const char *s2, int l1, int l2)
RZ_API void rz_list_delete(RZ_NONNULL RzList *list, RZ_NONNULL RzListIter *iter)
Removes an entry in the list by using the RzListIter pointer.
RZ_API RZ_OWN RzList * rz_list_new(void)
Returns a new initialized RzList pointer (free method is not initialized)
RZ_API RZ_BORROW RzListIter * rz_list_append(RZ_NONNULL RzList *list, void *data)
Appends at the end of the list a new element.
RZ_API void rz_list_free(RZ_NONNULL RzList *list)
Empties the list and frees the list pointer.
void * malloc(size_t size)
void * calloc(size_t number, size_t size)
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")
static uint32_t const uint8_t * buf2
#define rz_warn_if_reached()
#define rz_return_if_fail(expr)
#define rz_return_val_if_fail(expr, val)
RZ_API int rz_io_nread_at(RzIO *io, ut64 addr, ut8 *buf, int len)
void(* RzListFree)(void *ptr)
#define RZ_LOG_ERROR(fmtstr,...)
RZ_API void * rz_mem_dup(const void *s, int l)
RZ_API int rz_mem_eq(const ut8 *a, const ut8 *b, int len)
Compares memory a with b over len bytes.
RZ_API PJ * pj_ki(PJ *j, const char *k, int d)
RZ_API PJ * pj_k(PJ *j, const char *k)
RZ_API PJ * pj_end(PJ *j)
RZ_API PJ * pj_kn(PJ *j, const char *k, ut64 n)
RZ_API char * rz_strbuf_get(RzStrBuf *sb)
RzOutputMode
Enum to describe the way data are printed.
@ RZ_OUTPUT_MODE_STANDARD
Watcher which executes a command when listed.
Represent the output state of a command handler.
RzConsPrintablePalette pal
ut64(WINAPI *w32_GetEnabledXStateFeatures)()