6 #define STRING_CHUNK 16
50 RZ_LOG_ERROR(
"Fail to assemble by rz_asm_massemble()\n");
54 for (
int i = 0;
i < acode->
len;
i++) {
77 RZ_LOG_ERROR(
"Fail to assemble by rz_asm_massemble()\n");
81 int printed = 0, bufsz = acode->
len;
83 while (printed < bufsz) {
142 while (printed <
len) {
162 int len,
int base,
int step,
size_t zoomsz) {
168 rz_cons_print(
string);
178 rz_cons_print(
string);
188 rz_cons_print(
string);
211 int col = core->cons->columns > 123;
213 ba,
b, (
int)
len, col);
225 rz_cons_print(
string);
231 static const st8 bases[][9] = {
233 { 0, -1, -10, [4] = 10, [8] = -8 },
234 { 0, 16, 32, [4] = 32, [8] = 64 },
236 if (format >= RZ_CORE_PRINT_FORMAT_TYPE_INVALID ||
n >=
sizeof(bases[0])) {
239 return bases[format][
n];
243 if (format != RZ_CORE_PRINT_FORMAT_TYPE_INTEGER) {
246 static const st8 sizes[] = {
247 0, 4, 2, [4] = 4, [8] = 4
249 if (*
size >=
sizeof(sizes)) {
259 bool is_positive = *
len > 0;
329 rz_cons_print(
string);
364 core->num->value =
len;
385 rz_cons_print(
string);
421 for (
int i = 0;
i < round_len;
i +=
size) {
428 a =
p->colorfor(
p->user,
v,
true);
442 if (
v ==
f->offset) {
472 rz_cons_print(
string);
RZ_API void * rz_asm_code_free(RzAsmCode *acode)
RZ_API RzAsmCode * rz_asm_mdisassemble(RzAsm *a, const ut8 *buf, int len)
RZ_API int rz_asm_set_pc(RzAsm *a, ut64 pc)
RZ_API RzAsmCode * rz_asm_massemble(RzAsm *a, const char *assembly)
RZ_API ut64 rz_config_get_i(RzConfig *cfg, RZ_NONNULL const char *name)
static void len_fixup(RzCore *core, ut64 *addr, int *len)
RZ_API RZ_OWN char * rz_core_assembly_of_hex(RzCore *core, ut8 *hex, int len)
Get the assembly of the hexstr.
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)
static st8 format_type_to_base(const RzCorePrintFormatType format, const ut8 n)
RZ_IPI bool rz_core_print_dump(RZ_NONNULL RzCore *core, RzOutputMode mode, ut64 addr, ut8 n, int len, RzCorePrintFormatType format)
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.
static void fix_size_from_format(const RzCorePrintFormatType format, ut8 *size)
RZ_API RZ_OWN char * rz_core_esil_of_hex(RzCore *core, ut8 *hex, int len)
Get the esil of the hexstr.
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.
RZ_IPI bool rz_core_print_hexdump_diff(RZ_NONNULL RzCore *core, ut64 aa, ut64 ba, ut64 len)
RZ_IPI bool rz_core_print_hexdump_or_hexdiff(RZ_NONNULL RzCore *core, RZ_NULLABLE RzOutputMode mode, ut64 addr, int len, bool use_comment)
static char * ut64_to_hex(const ut64 x, const ut8 width)
RZ_API RZ_OWN char * rz_core_hex_of_assembly(RzCore *core, const char *assembly)
Get the hexpair of the assembly.
RZ_IPI void rz_core_print_jsondump(RZ_NONNULL RzCore *core, RZ_NONNULL const ut8 *buf, int len, int wordsize)
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.
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 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),.
RZ_API RZ_OWN char * rz_core_print_string_c_cpp(RzCore *core)
RZ_IPI bool rz_core_print_hexdump_byline(RZ_NONNULL RzCore *core, bool hexoffset, ut64 addr, int len, ut8 size)
RZ_API RZ_OWN char * rz_core_esil_of_assembly(RzCore *core, const char *assembly)
Get the esil of the assembly.
RZ_API ut64 rz_core_pava(RzCore *core, ut64 addr)
static states step(struct re_guts *, sopno, sopno, states, int, states)
RZ_API RzFlagItem * rz_flag_get_at(RzFlag *f, ut64 off, bool closest)
RZ_API void Ht_() free(HtName_(Ht) *ht)
void * malloc(size_t size)
static const char struct stat static buf struct stat static buf static idle const char static path static fd const char static len const void static prot const char struct module static image struct kernel_sym static table unsigned char static buf static fsuid unsigned struct dirent unsigned static count const struct iovec static count static pid const void static len static flags const struct sched_param static p static pid static policy struct timespec static tp static suid unsigned fn
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")
RZ_API bool rz_analysis_op_fini(RzAnalysisOp *op)
RZ_API int rz_analysis_op(RzAnalysis *analysis, RzAnalysisOp *op, ut64 addr, const ut8 *data, int len, RzAnalysisOpMask mask)
RZ_API void rz_print_init_rowoffsets(RzPrint *p)
RZ_API RZ_OWN char * rz_print_hexdiff_str(RZ_NONNULL RzPrint *p, ut64 aa, RZ_NONNULL const ut8 *_a, ut64 ba, RZ_NONNULL const ut8 *_b, int len, int scndcol)
Print hexdump diff between _a and _b.
RZ_API RZ_OWN char * rz_print_hexdump_str(RZ_NONNULL RzPrint *p, ut64 addr, RZ_NONNULL const ut8 *buf, int len, int base, int step, size_t zoomsz)
Prints a hexdump of buf at addr.
RZ_API RZ_OWN char * rz_print_jsondump_str(RZ_NONNULL RzPrint *p, RZ_NONNULL const ut8 *buf, int len, int wordsize)
Print dump in json format.
RZ_API char * rz_print_section_str(RzPrint *p, ut64 at)
static const char hex[16]
@ RZ_ANALYSIS_OP_MASK_ESIL
#define rz_warn_if_reached()
#define rz_return_val_if_fail(expr, val)
static ut64 rz_read_ble(const void *src, bool big_endian, int size)
RZ_API bool rz_io_read_at(RzIO *io, ut64 addr, ut8 *buf, int len)
#define RZ_LOG_VERBOSE(fmtstr,...)
#define RZ_LOG_ERROR(fmtstr,...)
#define RZ_PRINT_FLAGS_COMMENT
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 RZ_OWN char * rz_strbuf_drain(RzStrBuf *sb)
#define RZ_STRBUF_SAFEGET(sb)
RZ_API bool rz_strbuf_prepend(RzStrBuf *sb, const char *s)
RZ_API bool rz_strbuf_append(RzStrBuf *sb, const char *s)
RZ_API RzStrBuf * rz_strbuf_new(const char *s)
RZ_API void rz_strbuf_free(RzStrBuf *sb)
RZ_API bool rz_strbuf_appendf(RzStrBuf *sb, const char *fmt,...) RZ_PRINTF_CHECK(2
RZ_API int rz_strbuf_length(RzStrBuf *sb)
RzOutputMode
Enum to describe the way data are printed.
@ RZ_OUTPUT_MODE_STANDARD
static struct sockaddr static addrlen static backlog const void static flags void struct sockaddr from
static struct sockaddr static addrlen static backlog const void static flags void struct sockaddr socklen_t static fromlen const void const struct sockaddr to
ut64(WINAPI *w32_GetEnabledXStateFeatures)()