8 #include "../core_private.h"
10 #define MAX_SCAN_SIZE 0x7ffffff
15 "Usage:",
"a",
"[abdefFghoprxstc] [...]",
16 "a*",
"",
"same as afl*;ah*;ax*",
17 "aa",
"[?]",
"analyze all (fcns + bbs) (aa0 to avoid sub renaming)",
18 "a8",
" [hexpairs]",
"analyze bytes",
19 "ab",
"[?] [addr]",
"analyze block",
20 "ad",
"[?]",
"analyze data trampoline (wip)",
21 "ad",
" [from] [to]",
"analyze data pointers to (from-to)",
22 "ae",
"[?] [expr]",
"analyze opcode eval expression (see ao)",
23 "af",
"[?]",
"analyze Functions",
24 "aF",
"",
"same as above, but using analysis.depth=1",
25 "ag",
"[?] [options]",
"draw graphs in various formats",
26 "ah",
"[?]",
"analysis hints (force opcode size, ...)",
27 "ai",
" [addr]",
"address information (show perms, stack, heap, ...)",
28 "aj",
"",
"same as a* but in json (aflj)",
29 "aL",
"",
"list all asm/analysis plugins (e asm.arch=?)",
30 "an",
" [name] [@addr]",
"show/rename/create whatever flag/function is used at addr",
31 "ao",
"[?] [len]",
"analyze Opcodes (or emulate it)",
32 "aO",
"[?] [len]",
"Analyze N instructions in M bytes",
33 "ap",
"",
"find prelude for current offset",
34 "ar",
"[?]",
"like 'dr' but for the esil vm. (registers)",
35 "as",
"[?] [num]",
"analyze syscall using dbg.reg",
36 "av",
"[?] [.]",
"show vtables",
37 "ax",
"[?]",
"manage refs/xrefs (see also afx?)",
42 "Usage:",
"ad",
"[kt] [...]",
43 "ad",
" [N] [D]",
"analyze N data words at D depth",
44 "ad4",
" [N] [D]",
"analyze N data words at D depth (asm.bits=32)",
45 "ad8",
" [N] [D]",
"analyze N data words at D depth (asm.bits=64)",
46 "adf",
"",
"analyze data in function (use like .adf @@=`afl~[0]`",
47 "adfg",
"",
"analyze data in function gaps",
48 "adt",
"",
"analyze data trampolines (wip)",
49 "adk",
"",
"analyze data kind (code, text, data, invalid, ...)",
54 "Usage:",
"ae[idesr?] [arg]",
"ESIL code emulation",
55 "ae",
" [expr]",
"evaluate ESIL expression",
56 "ae?",
"",
"show this help",
57 "ae??",
"",
"show ESIL help",
58 "ae[aA]",
"[f] [count]",
"analyse esil accesses (regs, mem..)",
59 "aeC",
"[arg0 arg1..] @ addr",
"appcall in esil",
60 "aec",
"[?]",
"continue until ^C",
61 "aecb",
"",
"continue back until breakpoint",
62 "aecs",
"",
"continue until syscall",
63 "aecc",
"",
"continue until call",
64 "aecu",
" [addr]",
"continue until address",
65 "aecue",
" [esil]",
"continue until esil expression match",
66 "aef",
" [addr]",
"emulate function",
67 "aefa",
" [addr]",
"emulate function to find out args in given or current offset",
68 "aei",
"",
"initialize ESIL VM state (aei- to deinitialize)",
69 "aeim",
" [addr] [size] [name]",
"initialize ESIL VM stack (aeim- remove)",
70 "aeip",
"",
"initialize ESIL program counter to curseek",
71 "aek",
" [query]",
"perform sdb query on ESIL.info",
72 "aek-",
"",
"resets the ESIL.info sdb instance",
73 "aeli",
"",
"list loaded ESIL interrupts",
74 "aeli",
" [file]",
"load ESIL interrupts from shared object",
75 "aelir",
" [interrupt number]",
"remove ESIL interrupt and free it if needed",
76 "aepc",
" [addr]",
"change esil PC to this address",
77 "aes",
"",
"perform emulated debugger step",
78 "aesp",
" [X] [N]",
"evaluate N instr from offset X",
79 "aesb",
"",
"step back",
80 "aeso",
" ",
"step over",
81 "aesou",
" [addr]",
"step over until given address",
82 "aess",
" ",
"step skip (in case of CALL, just skip, instead of step into)",
83 "aesu",
" [addr]",
"step until given address",
84 "aesue",
" [esil]",
"step until esil expression match",
85 "aesuo",
" [optype]",
"step until given opcode type",
86 "aets",
"[?]",
"ESIL Trace session",
87 "aex",
" [hex]",
"evaluate opcode expression",
88 "aez",
"[?]",
"RzIL Emulation",
93 "Examples:",
"ESIL",
" examples and documentation",
94 "=",
"",
"assign updating internal flags",
95 ":=",
"",
"assign without updating internal flags",
96 "+=",
"",
"A+=B => B,A,+=",
97 "+",
"",
"A=A+B => B,A,+,A,=",
98 "++",
"",
"increment, 2,A,++ == 3 (see rsi,--=[1], ... )",
99 "--",
"",
"decrement, 2,A,-- == 1",
100 "*=",
"",
"A*=B => B,A,*=",
101 "/=",
"",
"A/=B => B,A,/=",
102 "%=",
"",
"A%=B => B,A,%=",
103 "&=",
"",
"and ax, bx => bx,ax,&=",
104 "|",
"",
"or r0, r1, r2 => r2,r1,|,r0,=",
105 "!=",
"",
"negate all bits",
106 "^=",
"",
"xor ax, bx => bx,ax,^=",
107 "",
"[]",
"mov eax,[eax] => eax,[],eax,=",
108 "=",
"[]",
"mov [eax+3], 1 => 1,3,eax,+,=[]",
109 "=",
"[1]",
"mov byte[eax],1 => 1,eax,=[1]",
110 "=",
"[8]",
"mov [rax],1 => 1,rax,=[8]",
111 "[]",
"",
"peek from random position",
112 "[N]",
"",
"peek word of N bytes from popped address",
113 "[*]",
"",
"peek some from random position",
114 "=",
"[*]",
"poke some at random position",
115 "$",
"",
"int 0x80 => 0x80,$",
116 "$$",
"",
"simulate a hardware trap",
117 "==",
"",
"pops twice, compare and update esil flags",
118 "<",
"",
"compare for smaller",
119 "<=",
"",
"compare for smaller or equal",
120 ">",
"",
"compare for bigger",
121 ">=",
"",
"compare bigger for or equal",
122 ">>=",
"",
"shr ax, bx => bx,ax,>>= # shift right",
123 "<<=",
"",
"shl ax, bx => bx,ax,<<= # shift left",
124 ">>>=",
"",
"ror ax, bx => bx,ax,>>>= # rotate right",
125 "<<<=",
"",
"rol ax, bx => bx,ax,<<<= # rotate left",
126 "?{",
"",
"if popped value != 0 run the block until }",
127 "POP",
"",
"drops last element in the esil stack",
128 "DUP",
"",
"duplicate last value in stack",
129 "NUM",
"",
"evaluate last item in stack to number",
130 "SWAP",
"",
"swap last two values in stack",
131 "TRAP",
"",
"stop execution",
132 "BITS",
"",
"16,BITS # change bits, useful for arm/thumb",
133 "TODO",
"",
"the instruction is not yet esilized",
134 "STACK",
"",
"show contents of stack",
135 "CLEAR",
"",
"clears the esil stack",
136 "REPEAT",
"",
"repeat n times",
137 "BREAK",
"",
"terminates the string parsing",
138 "SETJT",
"",
"set jump target",
139 "SETJTS",
"",
"set jump target set",
140 "SETD",
"",
"set delay slot",
141 "GOTO",
"",
"jump to the Nth word popped from the stack",
142 "$",
"",
"esil interrupt",
143 "$z",
"",
"internal flag: zero",
144 "$c",
"",
"internal flag: carry",
145 "$b",
"",
"internal flag: borrow",
146 "$p",
"",
"internal flag: parity",
147 "$s",
"",
"internal flag: sign",
148 "$o",
"",
"internal flag: overflow",
149 "$ds",
"",
"internal flag: delay-slot",
150 "$jt",
"",
"internal flag: jump-target",
151 "$js",
"",
"internal flag: jump-target-set",
153 "$$",
"",
"internal flag: pc address",
158 "Examples:",
"aea",
" show regs and memory accesses used in a range",
159 "aea",
" [ops]",
"Show regs/memory accesses used in N instructions ",
160 "aea*",
" [ops]",
"Create mem.* flags for memory accesses",
161 "aeab",
"",
"Show regs used in current basic block",
162 "aeaf",
"",
"Show regs used in current function",
163 "aear",
" [ops]",
"Show regs read in N instructions",
164 "aeaw",
" [ops]",
"Show regs written in N instructions",
165 "aean",
" [ops]",
"Show regs not written in N instructions",
166 "aeaj",
" [ops]",
"Show aea output in JSON format",
167 "aeA",
" [len]",
"Show regs used in N bytes (subcommands are the same)",
169 "I",
"",
"input registers (read before being set)",
170 "A",
"",
"all regs accessed",
171 "R",
"",
"register values read",
172 "W",
"",
"registers written",
173 "N",
"",
"read but never written",
175 "@R",
"",
"memreads",
176 "@W",
"",
"memwrites",
177 "NOTE:",
"",
"mem{reads,writes} with PIC only fetch the offset",
182 "Usage:",
"ag<graphtype><format> [addr]",
"",
183 "Graph commands:",
"",
"",
184 "aga",
"[format]",
"Data references graph",
185 "agA",
"[format]",
"Global data references graph",
186 "agc",
"[format]",
"Function callgraph",
187 "agC",
"[format]",
"Global callgraph",
188 "agd",
"[format] [fcn addr]",
"Diff graph",
189 "agf",
"[format]",
"Basic blocks function graph",
190 "agi",
"[format]",
"Imports graph",
191 "agr",
"[format]",
"References graph",
192 "agR",
"[format]",
"Global references graph",
193 "agx",
"[format]",
"Cross references graph",
194 "agg",
"[format]",
"Custom graph",
195 "ag-",
"",
"Clear the custom graph",
196 "agn",
"[?] title body",
"Add a node to the custom graph",
197 "age",
"[?] title1 title2",
"Add an edge to the custom graph",
199 "Output formats:",
"",
"",
200 "<blank>",
"",
"Ascii art",
201 "*",
"",
"rizin commands",
202 "d",
"",
"Graphviz dot",
203 "g",
"",
"Graph Modelling Language (gml)",
204 "j",
"",
"json ('J' for formatted disassembly)",
205 "k",
"",
"SDB key-value",
206 "t",
"",
"Tiny ascii art",
207 "v",
"",
"Interactive ascii art",
208 "w",
" [path]",
"Write to path or display graph image (see graph.gv.format)",
213 "Usage:",
"age [title1] [title2]",
"",
215 "age",
" title1 title2",
"Add an edge from the node with \"title1\" as title to the one with title \"title2\"",
216 "age",
" \"title1 with spaces\" title2",
"Add an edge from node \"title1 with spaces\" to node \"title2\"",
217 "age-",
" title1 title2",
"Remove an edge from the node with \"title1\" as title to the one with title \"title2\"",
218 "age?",
"",
"Show this help",
223 "Usage:",
"agn [title] [body]",
"",
225 "agn",
" title1 body1",
"Add a node with title \"title1\" and body \"body1\"",
226 "agn",
" \"title with space\" \"body with space\"",
"Add a node with spaces in the title and in the body",
227 "agn",
" title1 base64:Ym9keTE=",
"Add a node with the body specified as base64",
228 "agn-",
" title1",
"Remove a node with title \"title1\"",
229 "agn?",
"",
"Show this help",
245 if (rz_list_empty(
list)) {
251 "Re-run this command at the entrypoint of one of them to disambiguate.\n",
264 static int cmpaddr(
const void *_a,
const void *_b) {
266 return (
a->addr >
b->addr) ? 1 : (
a->addr <
b->addr) ? -1
286 if (!(acc->
type & access_type)) {
375 #define PJ_KS(pj, key, value) \
377 const char *value_tmp = (value); \
378 if (RZ_STR_ISNOTEMPTY(value_tmp)) { \
379 pj_ks(pj, key, value_tmp); \
382 #define PJ_KN(pj, key, value) \
384 const ut64 value_tmp = (value); \
385 if (value_tmp != UT64_MAX) { \
386 pj_kn(pj, key, value_tmp); \
396 switch (
state->mode) {
401 PJ_KS(pj,
"name",
p->name);
402 PJ_KS(pj,
"realname",
p->realname);
404 pj_kn(pj,
"offset",
p->offset);
411 if (
p->type == RZ_CORE_ANALYSIS_NAME_TYPE_ADDRESS) {
432 if (
n >=
a &&
n <=
b) {
433 if (element_size == 4) {
447 p = strchr(inp,
' ');
466 int *ec = (
int *)esil->
user;
472 int *ec = (
int *)esil->
user;
486 e->cb.mem_write =
mw;
499 for (
i =
idx = 0;
idx <
len && (!nops || (nops &&
i < nops));
i++,
idx += ret) {
509 totalsize +=
op.size;
523 for (
i =
idx = 0;
idx <
len && (!nops || (nops &&
i < nops));
i++,
idx += ret) {
543 RZ_LOG_ERROR(
"mnemonic %s has no description\n", opname);
556 const char *
color =
"";
565 for (
i =
idx = 0;
idx <
len && (!nops || (nops &&
i < nops));
i++,
idx += ret) {
605 if (!ab || !ab->op) {
614 PJ_KS(pj,
"opcode", ab->opcode);
615 PJ_KS(pj,
"disasm", ab->disasm);
616 PJ_KS(pj,
"pseudo", ab->pseudo);
617 PJ_KS(pj,
"description", ab->description);
618 PJ_KS(pj,
"mnemonic",
op->mnemonic);
619 PJ_KS(pj,
"mask", ab->mask);
626 PJ_KS(pj,
"esil", (hint && hint->
esil) ? hint->
esil : esilstr);
633 pj_kn(pj,
"prefix",
op->prefix);
640 PJ_KS(pj,
"bytes", ab->bytes);
653 if (
op->refptr != -1) {
654 pj_ki(pj,
"refptr",
op->refptr);
656 pj_ki(pj,
"cycles",
op->cycles);
657 pj_ki(pj,
"failcycles",
op->failcycles);
660 if (strcmp(p1,
"null") != 0) {
661 PJ_KS(pj,
"stack", p1);
663 pj_kn(pj,
"stackptr",
op->stackptr);
673 #define PRINTF_LN(k, fmt, arg) \
676 rz_cons_printf("%s%s: " Color_RESET, color, k); \
678 rz_cons_printf("%s: ", k); \
680 rz_cons_printf(fmt, arg); \
683 #define PRINTF_LN_NOT(k, fmt, arg, notv) \
684 if ((arg) != (notv)) { \
685 PRINTF_LN(k, fmt, arg) \
688 #define PRINTF_LN_STR(k, arg) \
690 const char *value = (arg); \
691 if (RZ_STR_ISNOTEMPTY(value)) { \
693 rz_cons_printf("%s%s: %s\n" Color_RESET, color, k, value); \
695 rz_cons_printf("%s: %s\n", k, value); \
755 if (
op->direction != 0) {
756 const char *dir =
op->direction == 1 ?
"read"
757 :
op->direction == 2 ?
"write"
758 :
op->direction == 4 ?
"exec"
759 :
op->direction == 8 ?
"ref"
826 if (cmd_esil_step && *cmd_esil_step) {
830 if (cmd_esil_step_out && *cmd_esil_step_out) {
861 #define return_tail(x) \
863 tail_return_value = x; \
866 int tail_return_value = 0;
877 if (esiltimeout > 0) {
887 if (esiltimeout > 0) {
890 if (elapsedTime >= esiltimeout) {
891 eprintf(
"[ESIL] Timeout exceeded.\n");
913 eprintf(
"[ESIL] Trap, trying to execute on non-executable memory\n");
921 if (
addr % dataAlign) {
925 if (breakoninvalid) {
926 rz_cons_printf(
"[ESIL] Stopped execution in an unaligned instruction (see e??esil.breakoninvalid)\n");
937 if (
op.size < 1 || ret < 1) {
941 if (breakoninvalid) {
942 eprintf(
"[ESIL] Stopped execution in an invalid instruction (see e??esil.breakoninvalid)\n");
959 if (
addr == until_addr) {
983 bool isNextFall =
false;
992 if (
op.delay && !isNextFall) {
1010 eprintf(
"[ESIL] Trap, trying to execute a branch in a delay slot\n");
1023 tail_return_value = 1;
1048 if (
pc == until_addr) {
1054 if (esil && esil->
trap) {
1072 return tail_return_value;
1101 bool bp_found =
false;
1128 switch (
state->mode) {
1133 pj_ks(pj,
"program",
"true");
1135 pj_ks(pj,
"library",
"true");
1137 pj_ks(pj,
"exec",
"true");
1139 pj_ks(pj,
"read",
"true");
1141 pj_ks(pj,
"write",
"true");
1143 pj_ks(pj,
"flag",
"true");
1145 pj_ks(pj,
"func",
"true");
1147 pj_ks(pj,
"stack",
"true");
1149 pj_ks(pj,
"heap",
"true");
1151 pj_ks(pj,
"reg",
"true");
1153 pj_ks(pj,
"ascii",
"true");
1155 pj_ks(pj,
"sequence",
"true");
1217 if (!strcmp(
name,
n))
1227 #define RZ_NEW_DUP(x) memcpy((void *)malloc(sizeof(x)), &(x), sizeof(x))
1237 if (
addr ==
n->addr) {
1257 if (
addr ==
n->addr) {
1314 if (!rz_list_empty(
list)) {
1328 if (!rz_list_empty(
list)) {
1331 rz_list_foreach (
list,
iter, item) {
1340 if (!rz_list_empty(
list)) {
1353 if (!rz_list_empty(
list)) {
1356 rz_list_foreach (
list,
iter, item) {
1366 int ptr,
ops, ops_end = 0,
len, buf_sz, maxopsize;
1369 const char *esilstr;
1378 if (maxopsize < 1) {
1390 buf_sz = ops_end * maxopsize;
1395 addr_end =
addr + buf_sz;
1414 #define hasNext(x) (x & 1) ? (addr < addr_end) : (ops < ops_end)
1418 esil->
user = &stats;
1454 if ((
mode >> 5) & 1) {
1469 if ((
mode >> 1) & 1) {
1471 }
else if ((
mode >> 2) & 1) {
1473 }
else if ((
mode >> 3) & 1) {
1475 }
else if ((
mode >> 4) & 1) {
1493 if (!rz_list_empty(regnow)) {
1509 }
else if ((
mode >> 5) & 1) {
1516 if (!rz_list_empty(stats.
regs)) {
1520 if (!rz_list_empty(stats.
regread)) {
1524 if (!rz_list_empty(stats.
regwrite)) {
1532 if (!rz_list_empty(regnow)) {
1558 for (
int i = 1;
i < argc; ++
i) {
1662 }
else if (argc == 2) {
1767 eprintf(
"Usage: aefa [from] # if no from address is given, uses fcn.addr\n");
1777 for (at =
from; at <
to; at++) {
1821 rz_list_foreach (fcn->
bbs,
iter, bb) {
1825 int ret, bbs =
end -
pc;
1826 if (bbs < 1 || bbs > 0xfffff ||
pc >=
end) {
1827 eprintf(
"Invalid block size\n");
1888 eprintf(
"Missing argument\n");
1902 eprintf(
"esil vm not initialized. run `aei`\n");
1922 if (esil && esil->
stats) {
1929 eprintf(
"esil.stats is empty. Run 'aei'\n");
1945 eprintf(
"Failed to load interrupts from '%s'.",
input + 3);
1965 if (
input[1] ==
'a') {
1972 if (
input[1] ==
'?') {
1974 }
else if (
input[1] ==
'r') {
1976 }
else if (
input[1] ==
'w') {
1978 }
else if (
input[1] ==
'n') {
1980 }
else if (
input[1] ==
'j') {
1982 }
else if (
input[1] ==
'*') {
1984 }
else if (
input[1] ==
'f') {
2003 if (
input[1] ==
'?') {
2005 }
else if (
input[1] ==
'r') {
2007 }
else if (
input[1] ==
'w') {
2009 }
else if (
input[1] ==
'n') {
2011 }
else if (
input[1] ==
'j') {
2013 }
else if (
input[1] ==
'*') {
2015 }
else if (
input[1] ==
'b') {
2016 bool json =
input[2] ==
'j';
2017 int a = json ? 3 : 2;
2022 rz_list_foreach (l,
iter,
b) {
2023 int mode = json ? (1 << 4) : 1;
2027 }
else if (
input[1] ==
'f') {
2041 }
else if (
input[1] ==
'b') {
2084 if (
input[1] ==
'?') {
2096 int bufi = 0, minop = 1;
2099 ut64 addr = core->offset, addr_end = 0;
2101 if (n_bytes > 0xffffff) {
2102 RZ_LOG_ERROR(
"number of bytes is too big (> 0xffffff)\n");
2116 if (
map->itv.size > bf->
size) {
2119 n_bytes = bf->
size -
map->delta;
2121 RZ_LOG_ERROR(
"aaT: binary size is smaller than map delta\n");
2126 n_bytes =
map->itv.size;
2129 if (
map &&
map->itv.addr !=
map->delta && bf->
size > (core->offset -
map->itv.addr +
map->delta)) {
2130 n_bytes = bf->
size - (core->offset -
map->itv.addr +
map->delta);
2132 if (bf->
size > core->offset) {
2133 n_bytes = bf->
size - core->offset;
2135 RZ_LOG_ERROR(
"aaT: found an invalid range where binary size > current offset\n");
2142 addr_end =
addr + n_bytes;
2152 while (
addr < addr_end) {
2177 if (trapcount > 0) {
2185 addr += (
op.size > 0) ?
op.size : 1;
2186 bufi += (
op.size > 0) ?
op.size : 1;
2198 const int bsz = 4096;
2200 int bufi_max = bsz - 16;
2207 if (!
buf || !block0 || !block1) {
2208 eprintf(
"Error: cannot allocate buf or block\n");
2223 if (bufi > bufi_max) {
2229 if (!memcmp(
buf, block0, bsz) || !memcmp(
buf, block1, bsz)) {
2235 if (hint && hint->
bits) {
2236 setBits = hint->
bits;
2247 bool isValidCall =
true;
2250 if (!
f || !strstr(
f->name,
"imp.")) {
2251 isValidCall =
false;
2256 isValidCall =
false;
2261 isValidCall = memcmp(
buf,
"\x00\x00\x00\x00", 4);
2274 if ((
int)
op.size < 1) {
2278 bufi += addrbytes *
op.size;
2294 addr = core->offset;
2305 rz_list_foreach (ranges,
iter,
map) {
2313 rz_list_foreach (ranges,
iter,
r) {
2341 return sdb_fmt(
n > 1000 ?
"0x%x" :
"%d",
n);
2350 switch (
state->mode) {
2456 switch (xrefi->
type) {
2468 #define var_ref_list(a, d, t) sdb_fmt("var.0x%" PFMT64x ".%d.%d.%s", \
2469 a, 1, d, (t == 'R') ? "reads" : "writes");
2473 const char *viewers[] = {
2485 for (
i = 0; viewers[
i];
i++) {
2487 if (viewerPath && strcmp(viewerPath, viewers[
i])) {
2496 const char *dot =
"dot";
2498 if (!strcmp(dotPath, dot)) {
2502 if (!strcmp(dotPath, dot)) {
2512 bool result =
false;
2514 eprintf(
"Graphviz not found\n");
2520 if (save_path && *save_path) {
2529 eprintf(
"Cannot find a valid picture viewer\n");
2542 if (save_path && *save_path) {
2551 if (save_path && *save_path) {
2570 if (n_args < 1 || n_args > 3) {
2575 const char *title =
args[0];
2576 const char *body = n_args > 1 ?
args[1] :
"";
2577 int color = n_args > 2 ? atoi(
args[2]) : -1;
2639 if (use_utf != -1) {
2683 rz_list_foreach (graph->
nodes, it, node) {
2686 print_node = node->
data;
2688 len = strlen(print_node->
body);
2689 if (
len > 0 && print_node->
body[
len - 1] ==
'\n') {
2699 rz_list_foreach (graph->
nodes, it, node) {
2700 print_node = node->
data;
2701 rz_list_foreach (node->
out_nodes, edge_it, target) {
2710 char *node_properties =
rz_str_newf(
"fontname=\"%s\"", font);
2712 free(node_properties);
2722 if (use_utf != -1) {
2777 eprintf(
"This graph contains no nodes\n");
2787 rz_cons_print(dot_text);
2809 rz_list_foreach (graph->
nodes, it, graphNode) {
2810 print_node = graphNode->
data;
2815 graphNode->
idx, print_node->
title);
2817 rz_list_foreach (graph->
nodes, it, graphNode) {
2818 rz_list_foreach (graphNode->
out_nodes, edge_it, target) {
2823 graphNode->
idx, target->
idx);
2826 rz_cons_print(
"]\n");
2857 eprintf(
"\rRendering graph...\n");
2874 if (
input[2] ==
'm') {
3013 eprintf(
"Couldn't create graph");
3023 eprintf(
"Couldn't create graph");
3187 char *bitmap =
calloc(1, fcn_size);
3191 rz_list_foreach (fcn->
bbs,
iter,
b) {
3192 int f =
b->addr - fcn->
addr;
3193 int t =
RZ_MIN(
f +
b->size, fcn_size);
3201 for (
i = 0;
i < fcn_size;
i++) {
3203 if (bitmap && bitmap[
i]) {
3229 int i, wordsize = (core->
rasm->
bits == 64) ? 8 : 4;
3235 for (
i = 0;
i + wordsize <
range;
i += wordsize) {
3269 char *classname = (
char *)
argv[1];
3288 const char *var_name =
argv[1];
3292 char *errmsg =
NULL;
3295 RZ_LOG_ERROR(
"%s : Error parsing type: \"%s\" message:\n%s\n", __FUNCTION__,
type, errmsg);
3331 const char *oldname =
argv[1];
3332 const char *newname =
argv[2];
3347 char *errmsg =
NULL;
3350 RZ_LOG_ERROR(
"%s : Error parsing type: \"%s\" message:\n%s\n", __FUNCTION__,
type, errmsg);
3365 const ut8 *prelude = (
const ut8 *)
"\xe9\x2d";
3366 const int prelude_sz = 2;
3367 const int bufsz = 4096;
3370 if (
input[1] ==
' ') {
3386 eprintf(
"Cannot find prelude\n");
3405 if (
input[2] ==
'g') {
3415 const int default_depth = 1;
3419 p = strchr(
input + 2,
' ');
3473 eprintf(
"Cannot find basic block\n");
3486 while (!rz_list_empty(fcn->
bbs)) {
3496 if (!rz_list_empty(
blocks)) {
3508 if (rz_list_empty(
blocks)) {
3514 if (!
b->switch_op) {
3604 rz_list_foreach (fcn->
bbs,
iter, bb) {
3653 char *error_msg =
NULL;
3655 if (!ret_type || error_msg) {
3656 eprintf(
"Cannot parse type \"%s\":\n%s\n",
argv[1], error_msg);
3680 rz_list_foreach (
list,
iter, xref) {
3702 rz_list_foreach (xrefs,
iter, xref) {
3703 switch (
state->mode) {
3706 switch (xref->
type) {
3719 char *nl = strchr(
s,
'\n');
3783 if (addr_end < core->
offset) {
3784 eprintf(
"Invalid address ranges\n");
3792 return (
a &&
b) ? (
a->delta >
b->delta) - (
a->delta <
b->delta) : 0;
3806 rz_list_foreach (
list,
iter, var) {
3807 if (var->
kind != kind) {
3810 switch (
state->mode) {
3822 kind,
i->name, var->
name, vartype, fcn->
addr);
3835 switch (var->
kind) {
3894 char sign = (-var->
delta <= fcn->
bp_off) ?
'+' :
'-';
3945 const char *bp =
NULL;
3949 switch (
state->mode) {
3959 rz_list_foreach (
list,
iter, var) {
3990 rz_list_foreach (
list,
iter, var) {
4053 eprintf(
"Cannot find variable '%s' in current function\n",
argv[1]);
4089 if (
p->isarg ||
p->delta > 0) {
4099 if (!
p->isarg &&
p->delta < 0) {
4114 const char *newname =
argv[1];
4115 const char *oldname =
argv[2];
4130 rz_list_foreach (
list,
iter, var) {
4137 eprintf(
"Cannot find variable %s\n", varname);
4164 char *error_msg =
NULL;
4166 if (!v_type || error_msg) {
4167 eprintf(
"Cannot parse type \"%s\":\n%s\n",
argv[2], error_msg);
4257 eprintf(
"Cannot find variable with delta %d\n",
delta);
4262 const char *ireg =
op ?
op->ireg :
NULL;
4282 const char *varname =
argv[2];
4283 const char *vartype = argc > 3 ?
argv[3] :
"int";
4285 bool isarg =
delta > 0;
4286 char *error_msg =
NULL;
4288 if (!var_type || error_msg) {
4289 eprintf(
"Cannot parse type \"%s\":\n%s\n", vartype, error_msg);
4330 const char *varname =
argv[2];
4331 const char *vartype = argc > 3 ?
argv[3] :
"int";
4334 eprintf(
"Register not found");
4339 char *error_msg =
NULL;
4341 if (!var_type || error_msg) {
4342 eprintf(
"Cannot parse type \"%s\":\n%s\n", vartype, error_msg);
4363 eprintf(
"Register not found");
4374 eprintf(
"Register not found");
4393 const char *varname =
argv[2];
4394 const char *vartype = argc > 3 ?
argv[3] :
"int";
4397 char *error_msg =
NULL;
4399 if (!var_type || error_msg) {
4400 eprintf(
"Cannot parse type \"%s\":\n%s\n", vartype, error_msg);
4456 rz_list_foreach (
list,
iter, xref) {
4496 rz_list_foreach (
list,
iter, xref) {
4506 switch (
state->mode) {
4511 rz_list_foreach (
list,
iter, xref) {
4535 switch (
state->mode) {
4537 rz_list_foreach (
list,
iter, xref) {
4542 const char *nl = comment ? strchr(comment,
'\n') :
NULL;
4546 char *buf_fcn = comment
4557 rz_list_foreach (
list,
iter, xref) {
4582 switch (
state->mode) {
4584 rz_list_foreach (
list,
iter, xref) {
4615 rz_list_foreach (
list,
iter, xref) {
4639 rz_list_foreach (
list,
iter, xref) {
4650 rz_list_foreach (
list,
iter, xref) {
4668 rz_list_foreach (
list,
iter, xref) {
4686 rz_list_foreach (
list,
iter, xref) {
4699 pj_ks(pj,
"type",
"fcn");
4713 if (
spaces >
sizeof(pre) - 4) {
4714 spaces =
sizeof(pre) - 4;
4716 memset(pre,
' ',
sizeof(pre));
4717 strcpy(pre +
spaces,
"- ");
4720 bool open_object =
false;
4721 if (!rz_list_empty(xrefs)) {
4726 }
else if (is_json) {
4736 }
else if (is_json) {
4749 rz_list_foreach (xrefs,
iter, xref) {
4755 }
else if (is_json) {
4760 if (ht_uu_insert(ht, fcn->
addr, 1)) {
4772 }
else if (is_json) {
4777 pj_ks(pj,
"type",
"???");
4783 if (ht_uu_insert(ht, xref->
from, 1)) {
4804 HtUU *ht = ht_uu_new0();
4814 #define CMD_REGS_PREFIX analysis
4815 #define CMD_REGS_REG_PATH analysis->reg
4816 #define CMD_REGS_SYNC NULL
4818 #undef CMD_REGS_PREFIX
4819 #undef CMD_REGS_REG_PATH
4820 #undef CMD_REGS_SYNC
4823 return xref1->
to != xref2->
to;
4852 rz_list_foreach (
list,
iter, fcn) {
4879 xref_to_num, xref_from_num, calls_num,
4888 xref_to_num, xref_from_num, calls_num,
4899 rz_list_foreach (
list, it, fcn) {
4903 if (realsize ==
size) {
4918 rz_list_foreach (
list, it, fcn) {
4924 switch (fcn->
type) {
4952 rz_list_foreach (fcn->
bbs,
iter, bbi) {
4967 rz_list_foreach (
list, it, fcn) {
4978 if (fcn->
bits != 0) {
4982 if (fcn->
cc || defaultCC) {
5039 if (!rz_list_empty(xrefs)) {
5042 rz_list_foreach (xrefs,
iter, xrefi) {
5055 rz_list_foreach (xrefs,
iter, xrefi) {
5067 if (!rz_list_empty(xrefs)) {
5070 rz_list_foreach (xrefs,
iter, xrefi) {
5082 rz_list_foreach (xrefs,
iter, xrefi) {
5095 pj_ki(
state->d.pj,
"nlocals",
rz_analysis_var_count(core->
analysis, fcn,
'b', 0) +
rz_analysis_var_count(core->
analysis, fcn,
'r', 0) +
rz_analysis_var_count(core->
analysis, fcn,
's', 0));
5096 pj_ki(
state->d.pj,
"nargs",
rz_analysis_var_count(core->
analysis, fcn,
'b', 1) +
rz_analysis_var_count(core->
analysis, fcn,
'r', 1) +
rz_analysis_var_count(core->
analysis, fcn,
's', 1));
5120 rz_list_foreach (
list, it, fcn) {
5129 switch (
state->mode) {
5193 rz_list_foreach (fcns, fcniter, fcn) {
5200 if (!rz_list_empty(uniq_xrefs)) {
5219 rz_list_foreach (uniq_xrefs, refiter, xrefi) {
5253 switch (
state->mode) {
5281 rz_list_foreach (fcns,
iter, fcn) {
5308 rz_list_foreach (traced->
traces,
iter, trace) {
5309 if (!trace->
tag || (
tag & trace->
tag)) {
5346 rz_list_foreach (xrefs,
iter, xrefi) {
5356 rz_list_foreach (xrefs,
iter, xrefi) {
5367 rz_list_foreach (xrefs,
iter, xrefi) {
5378 rz_list_foreach (xrefs,
iter, xrefi) {
5393 rz_cons_printf(
"\nlocals: %d\nargs: %d\n", var_count, args_count);
5416 rz_list_foreach (fcns,
iter, fcn) {
5425 switch (
state->mode) {
5483 HtPUKv *kv = ht_pu_find_kv(ht,
key, &
found);
5487 ht_pu_insert(ht,
key, 1);
5510 char *
sp = strchr(
op->mnemonic,
' ');
5526 rz_list_foreach (fcn->
bbs,
iter, bb) {
5584 HtPU *ht = ht_pu_new0();
5595 if (strcmp(
k,
".addr")) {
5596 ht_pu_insert(ht,
k, 1);
5611 HtPU *keys_set = ht_pu_new0();
5613 if (!
keys || !keys_set || !dbs) {
5620 HtPU *db = ht_pu_new0();
5625 ht_pu_insert(db,
".addr", fcn->
addr);
5630 rz_list_foreach (dbs,
iter, db) {
5649 rz_list_foreach (dbs, iter2, db) {
5654 ut64 fcnAddr = ht_pu_find(db,
".addr",
NULL);
5668 ht_pu_free(keys_set);
5718 if (code_size < 1) {
5721 char *bitmap =
calloc(1, code_size + 64);
5732 rz_list_foreach (fcn->
bbs, iter2,
b) {
5734 if ((fcn->
addr < base_addr) || (fcn->
addr >= base_addr + code_size))
5739 bitmap[
b->addr +
counter - base_addr] =
'=';
5741 bitmap[fcn->
addr - base_addr] =
'F';
5749 for (
ut64 i = 0;
i < code_size;
i += 1) {
5766 rz_cons_printf(
"\n%d / %" PFMT64u " (%.2lf%%) bytes assigned to a function\n", assigned, code_size, 100.0 * ((
float)assigned) / code_size);
5787 RZ_LOG_ERROR(
"Unknown calling convention. See `afcl` for available ones.\n");
5826 if (rz_list_empty(
list)) {
5833 rz_list_foreach (
list, it, fcn) {
5837 }
else if (
delta < 0) {
5849 bool analyze_recursively =
true;
5850 if (!strcmp(
argv[0],
"af")) {
5863 switch (
argv[3][0]) {
5876 switch (
argv[2][0]) {
5927 if (block && !rz_list_empty(block->
fcns)) {
5952 for (
ut64 i = 0;
i < repeat_times; ++
i) {
5971 for (
ut64 i = 0;
i < repeat_times; ++
i) {
5994 if (
pc == address) {
6231 rz_list_foreach (typeoffs,
iter, ty) {
6243 RzAnalysisBaseClass *base;
6247 rz_cons_print(
": ");
6250 rz_cons_print(
", ");
6252 rz_cons_print(base->class_name);
6257 rz_cons_print(
"]\n");
6262 RzAnalysisVTable *vtable;
6265 if (vtable->offset > 0) {
6268 rz_cons_print(
")\n");
6279 char *method_type[] = {
"DEFAULT",
"VIRTUAL",
"V_DESTRUCTOR",
"DESTRUCTOR",
"CONSTRUCTOR" };
6280 RzAnalysisMethod *meth;
6293 if (meth->vtable_offset >= 0) {
6312 pj_ks(pj,
"name", class_name);
6318 RzAnalysisBaseClass *base;
6321 pj_ks(pj,
"id", base->id);
6322 pj_ks(pj,
"name", base->class_name);
6323 pj_kn(pj,
"offset", base->offset);
6330 pj_k(pj,
"vtables");
6334 RzAnalysisVTable *vtable;
6337 pj_ks(pj,
"id", vtable->id);
6338 pj_kn(pj,
"addr", vtable->addr);
6339 pj_kn(pj,
"offset", vtable->offset);
6345 pj_k(pj,
"methods");
6349 char *method_type[] = {
"DEFAULT",
"VIRTUAL",
"V_DESTRUCTOR",
"DESTRUCTOR",
"CONSTRUCTOR" };
6350 RzAnalysisMethod *meth;
6353 pj_ks(pj,
"name", meth->real_name);
6354 pj_kn(pj,
"addr", meth->addr);
6355 pj_ks(pj,
"type", method_type[meth->method_type]);
6356 if (meth->vtable_offset >= 0) {
6357 pj_kn(pj,
"vtable_offset", (
ut64)meth->vtable_offset);
6381 ctx.analysis = analysis;
6392 RzAnalysisBaseClass *base;
6401 RzAnalysisVTable *vtable;
6410 RzAnalysisMethod *meth;
6449 const char *class_name =
argv[1];
6454 switch (
state->mode) {
6472 case RZ_ANALYSIS_CLASS_ERR_SUCCESS:
6475 case RZ_ANALYSIS_CLASS_ERR_NONEXISTENT_CLASS:
6478 case RZ_ANALYSIS_CLASS_ERR_CLASH:
6479 RZ_LOG_ERROR(
"A class with this name already exists.\n");
6488 const char *class_name =
argv[1];
6489 if (strchr(class_name,
' ')) {
6503 const char *old_name =
argv[1];
6504 const char *new_name =
argv[2];
6505 if (strchr(new_name,
' ')) {
6527 case RZ_ANALYSIS_CLASS_ERR_NONEXISTENT_ATTR:
6530 case RZ_ANALYSIS_CLASS_ERR_CLASH:
6541 RzAnalysisMethod meth;
6544 meth.method_type = RZ_ANALYSIS_CLASS_METHOD_DEFAULT;
6546 meth.vtable_offset = -1;
6568 case RZ_ANALYSIS_CLASS_ERR_NONEXISTENT_ATTR:
6571 case RZ_ANALYSIS_CLASS_ERR_CLASH:
6582 RzAnalysisBaseClass base;
6600 const char *class_name =
argv[1];
6606 if (!class_name_sanitized) {
6610 free(class_name_sanitized);
6613 RzAnalysisBaseClass *base;
6624 case RZ_ANALYSIS_CLASS_ERR_NONEXISTENT_ATTR:
6627 case RZ_ANALYSIS_CLASS_ERR_CLASH:
6638 RzAnalysisVTable vtable;
6660 const char *class_name =
argv[1];
6666 if (!class_name_sanitized) {
6670 free(class_name_sanitized);
6674 RzAnalysisVTable *vtable;
6684 RVTableContext vtableContext;
6686 ut8 function_ptr_size = vtableContext.word_size;
6693 RzAnalysisVTable *vtable;
6695 if (vtable->size <
offset + function_ptr_size ||
offset % function_ptr_size) {
6699 if (vtableContext.read_addr(analysis, vtable->addr +
offset, &func_address)) {
6700 rz_cons_printf(
"Function address: 0x%08" PFMT64x ", in %s vtable %s\n", func_address, class_name, vtable->id);
6708 const char *class_name = argc == 3 ?
argv[2] :
NULL;
6743 switch (
state->mode) {
6760 switch (
state->mode) {
6808 switch (
state->mode) {
6905 char *instr_tmp =
NULL;
6926 rz_list_foreach (hooks,
iter, hook) {
6976 nl = strchr(ptr,
'\n');
6988 nl = strchr(ptr,
'\n');
7019 if (!reg_flags_defined) {
7029 if (!reg_flags_defined) {
7044 rz_list_foreach (xrefs,
iter, xref) {
7062 for (
size_t i = 0;
i < block->
size;
i++) {
7097 "traced",
"ninstr",
"jump",
"fail",
"fcns",
"calls",
"xrefs");
7104 switch (
state->mode) {
7121 rz_list_foreach (xrefs, iter2,
addr) {
7130 rz_list_foreach (calls, iter2,
addr) {
7138 rz_list_foreach (block->
fcns, iter2, fcn) {
7181 rz_list_foreach (xrefs, iter2,
addr) {
7189 rz_list_foreach (calls, iter2,
addr) {
7196 rz_list_foreach (block->
fcns, iter2, fcn) {
7228 rz_list_foreach (
path, it, block) {
7229 switch (
state->mode) {
7255 char *debugger =
NULL;
7257 const char *notify =
"Analyze all flags starting with sym. and entry0 (aa)";
7313 rz_list_foreach (
list,
iter, xref) {
7341 RZ_LOG_ERROR(
"Cannot find maps with exec permisions.\n");
7382 double precentage = (
code > 0) ? (covr * 100.0 /
code) : 0;
7384 switch (
state->mode) {
7395 rz_cons_printf(
"percentuage: %.2f%% (coverage on code size)\n", precentage);
7474 rz_list_foreach (
symbols, it, symbol) {
7528 ut64 chunk_size, chunk_offset,
i;
7535 if (code_size < 1) {
7540 bitmap =
calloc(1, code_size + 64);
7549 rz_list_foreach (fcn->
bbs, iter2,
b) {
7551 if ((fcn->
addr < base_addr) || (fcn->
addr >= base_addr + code_size))
7555 bitmap[
b->addr +
counter - base_addr] =
'=';
7559 bitmap[fcn->
addr - base_addr] =
'F';
7566 for (
i = 0;
i < code_size;
i++) {
7569 if (chunk_size >= min_len) {
7578 chunk_offset =
i + 1;
7583 if (chunk_size >= 16) {
7615 switch (
state->mode) {
static void print_comment(const aarch64_inst *inst, struct disassemble_info *info)
RZ_API int rz_core_visual_graph(RzCore *core, RzAGraph *g, RzAnalysisFunction *_fcn, int is_interactive)
RZ_API void rz_agraph_set_title(RzAGraph *g, const char *title)
RZ_API RzANode * rz_agraph_get_first_node(const RzAGraph *g)
RZ_API Sdb * rz_agraph_get_sdb(RzAGraph *g)
RZ_API void rz_agraph_set_curnode(RzAGraph *g, RzANode *a)
RZ_API void rz_agraph_print(RzAGraph *g)
static void update_seek(RzConsCanvas *can, RzANode *n, int force)
RZ_API RzAGraph * create_agraph_from_graph(const RzGraph *graph)
Create RzAGraph from generic RzGraph with RzGraphNodeInfo as node data.
RZ_API void rz_analysis_diff_free(RzAnalysisDiff *diff)
RZ_API RZ_OWN RzAnalysisDiff * rz_analysis_diff_new(void)
RZ_API RZ_BORROW RzList * rz_analysis_function_list(RzAnalysis *analysis)
RZ_API RzAnalysisFunction * rz_analysis_get_function_at(RzAnalysis *analysis, ut64 addr)
RZ_API ut64 rz_analysis_function_max_addr(RzAnalysisFunction *fcn)
RZ_API ut64 rz_analysis_function_size_from_entry(RzAnalysisFunction *fcn)
RZ_API RzList * rz_analysis_get_functions_in(RzAnalysis *analysis, ut64 addr)
RZ_API ut64 rz_analysis_function_linear_size(RzAnalysisFunction *fcn)
RZ_API void rz_analysis_function_remove_block(RzAnalysisFunction *fcn, RzAnalysisBlock *bb)
RZ_API ut64 rz_analysis_function_realsize(const RzAnalysisFunction *fcn)
RZ_API RzAnalysisFunction * rz_analysis_create_function(RzAnalysis *analysis, const char *name, ut64 addr, int type, RzAnalysisDiff *diff)
RZ_API ut64 rz_analysis_function_min_addr(RzAnalysisFunction *fcn)
RZ_API bool rz_analysis_function_contains(RzAnalysisFunction *fcn, ut64 addr)
RZ_API void rz_analysis_add_import(RzAnalysis *analysis, const char *imp)
RZ_API void rz_analysis_purge_imports(RzAnalysis *analysis)
RZ_API int rz_analysis_archinfo(RzAnalysis *analysis, int query)
RZ_API bool cmd_analysis_objc(RzCore *core, bool auto_analysis)
static bool finish(void *user)
RZ_API void rz_core_analysis_type_match(RzCore *core, RzAnalysisFunction *fcn, HtUU *loop_table)
RZ_API char * rz_asm_op_get_asm(RzAsmOp *op)
RZ_API int rz_reg_arena_push(RzReg *reg)
RZ_API void rz_reg_arena_pop(RzReg *reg)
RZ_API int rz_asm_mnemonics_byname(RzAsm *a, const char *name)
RZ_API char * rz_asm_describe(RzAsm *a, const char *str)
RZ_API char * rz_asm_mnemonics(RzAsm *a, int id, bool json)
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_DEPRECATE RZ_API RZ_BORROW RzBinInfo * rz_bin_get_info(RzBin *bin)
RZ_DEPRECATE RZ_API RZ_BORROW RzList * rz_bin_get_entries(RZ_NONNULL RzBin *bin)
RZ_API RzBinObject * rz_bin_cur_object(RzBin *bin)
RZ_API RzBinFile * rz_bin_cur(RzBin *bin)
static RzList * classes(RzBinFile *bf)
RzList * entries(RzBinFile *bf)
RzBinInfo * info(RzBinFile *bf)
RzList * symbols(RzBinFile *bf)
static const char * typeString(ut32 n, int *bits)
static void rz_cmd(int in, int out, const char *cmd)
int bits(struct state *s, int need)
RZ_API RzAnalysisBlock * rz_analysis_get_block_at(RzAnalysis *analysis, ut64 addr)
RZ_API void rz_analysis_block_add_switch_case(RzAnalysisBlock *block, ut64 switch_addr, ut64 case_value, ut64 case_addr)
RZ_API RzList * rz_analysis_get_blocks_in(RzAnalysis *analysis, ut64 addr)
RZ_API RzAnalysisBlock * rz_analysis_find_most_relevant_block_in(RzAnalysis *analysis, ut64 off)
RZ_API RZ_NULLABLE RzList * rz_analysis_block_shortest_path(RzAnalysisBlock *block, ut64 dst)
const lzma_allocator const uint8_t size_t uint8_t * out
RZ_API const RzList * rz_bin_object_get_symbols(RZ_NONNULL RzBinObject *obj)
Get list of RzBinSymbol representing the symbols in the binary object.
RZ_API RzBreakpointItem * rz_bp_get_in(RzBreakpoint *bp, ut64 addr, int perm)
RZ_API RZ_BORROW RzBreakpointItem * rz_bp_get_at(RZ_NONNULL RzBreakpoint *bp, ut64 addr)
Get the breakpoint at exactly addr.
RZ_API RZ_OWN RzType * rz_type_parse_string_single(RzTypeParser *parser, const char *code, char **error_msg)
Parses the single C type definition.
RZ_IPI void rz_core_agraph_add_edge(RzCore *core, const char *un, const char *vn)
RZ_IPI void rz_core_agraph_print_interactive(RzCore *core)
RZ_IPI void rz_core_agraph_print_tiny(RzCore *core)
RZ_IPI void rz_core_agraph_reset(RzCore *core)
RZ_IPI void rz_core_agraph_print_json(RzCore *core)
RZ_IPI void rz_core_agraph_print_dot(RzCore *core)
RZ_IPI void rz_core_agraph_del_edge(RzCore *core, const char *un, const char *vn)
RZ_IPI void rz_core_agraph_print_rizin(RzCore *core)
RZ_IPI void rz_core_agraph_print_sdb(RzCore *core)
RZ_IPI void rz_core_agraph_del_node(RzCore *core, const char *title)
RZ_IPI void rz_core_agraph_print_gml(RzCore *core)
RZ_IPI void rz_core_agraph_print_ascii(RzCore *core)
RZ_IPI void rz_core_agraph_add_node(RzCore *core, const char *title, const char *body, int color)
static RzNumCalcValue expr(RzNum *, RzNumCalc *, int)
RZ_API void rz_core_analysis_function_strings_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzAnalysisFunction *fcn, RZ_NULLABLE PJ *pj)
Print all string flags referenced by the function.
RZ_IPI void rz_core_analysis_bb_info_print(RzCore *core, RzAnalysisBlock *bb, ut64 addr, RzCmdStateOutput *state)
RZ_API RzGraph * rz_core_analysis_codexrefs(RzCore *core, ut64 addr)
RZ_API void rz_core_analysis_fcn_merge(RzCore *core, ut64 addr, ut64 addr2)
RZ_IPI char * rz_core_analysis_all_vars_display(RzCore *core, RzAnalysisFunction *fcn, bool add_name)
RZ_API RzList * rz_core_analysis_fcn_get_calls(RzCore *core, RzAnalysisFunction *fcn)
RZ_API char * rz_core_analysis_fcn_name(RzCore *core, RzAnalysisFunction *fcn)
RZ_IPI void rz_core_analysis_cc_print(RzCore *core, RZ_NONNULL const char *cc, RZ_NULLABLE PJ *pj)
Print Calling Convention info.
RZ_API RZ_OWN RzPVector * rz_core_analysis_bytes(RZ_NONNULL RzCore *core, RZ_NONNULL const ut8 *buf, int len, int nops)
RZ_API void rz_core_analysis_hint_print(RzAnalysis *a, ut64 addr, RzCmdStateOutput *state)
RZ_API void rz_core_recover_vars(RzCore *core, RzAnalysisFunction *fcn, bool argonly)
RZ_API bool rz_core_analysis_esil_trace_stop(RzCore *core)
Stop ESIL trace session.
RZ_API int rz_core_print_bb_custom(RzCore *core, RzAnalysisFunction *fcn)
RZ_API void rz_core_analysis_sigdb_print(RZ_NONNULL RzCore *core, RZ_NONNULL RzTable *table)
Adds all the signatures to a RzTable structure.
RZ_API int rz_core_analysis_all(RzCore *core)
RZ_IPI void rz_core_analysis_bbs_asciiart(RzCore *core, RzAnalysisFunction *fcn)
RZ_IPI char * rz_core_analysis_var_display(RzCore *core, RzAnalysisVar *var, bool add_name)
RZ_API bool rz_core_analysis_continue_until_call(RZ_NONNULL RzCore *core)
Continue until call.
RZ_API ut64 rz_core_analysis_address(RzCore *core, ut64 addr)
RZ_API void rz_core_analysis_undefine(RzCore *core, ut64 off)
RZ_API bool rz_core_analysis_function_add(RzCore *core, const char *name, ut64 addr, bool analyze_recursively)
RZ_IPI bool rz_core_analysis_function_delete_var(RzCore *core, RzAnalysisFunction *fcn, RzAnalysisVarKind kind, const char *id)
RZ_IPI bool rz_core_analysis_function_set_signature(RzCore *core, RzAnalysisFunction *fcn, const char *newsig)
RZ_API void rz_core_analysis_coderefs(RzCore *core, ut64 addr)
RZ_API void rz_core_analysis_callgraph(RzCore *core, ut64 addr, int fmt)
RZ_API void rz_core_analysis_flag_every_function(RzCore *core)
RZ_API void rz_core_analysis_datarefs(RzCore *core, ut64 addr)
RZ_API void rz_core_analysis_hint_list_print(RzAnalysis *a, RzCmdStateOutput *state)
RZ_API RzAnalysisOp * rz_core_analysis_op(RzCore *core, ut64 addr, int mask)
RZ_API void rz_core_analysis_autoname_all_fcns(RzCore *core)
RZ_API bool rz_core_analysis_continue_until_syscall(RZ_NONNULL RzCore *core)
Continue until syscall.
RZ_API st64 rz_core_analysis_code_count(RZ_NONNULL RzCore *core)
Compute analysis code count.
RZ_IPI void rz_core_analysis_value_pointers(RzCore *core, RzOutputMode mode)
RZ_API bool rz_core_analysis_everything(RzCore *core, bool experimental, char *dh_orig)
RZ_API RzList * rz_core_analysis_cycles(RzCore *core, int ccl)
RZ_API RZ_BORROW const char * rz_core_analysis_name_type_to_str(RzCoreAnalysisNameType typ)
Convert typ to string (const char*)
RZ_IPI char * rz_core_analysis_function_signature(RzCore *core, RzOutputMode mode, char *fcn_name)
RZ_API bool rz_core_analysis_esil_trace_start(RzCore *core)
Start ESIL trace session.
RZ_API void rz_core_analysis_esil(RzCore *core, ut64 addr, ut64 size, RZ_NULLABLE RzAnalysisFunction *fcn)
RZ_IPI bool rz_core_analysis_types_propagation(RzCore *core)
RZ_IPI void rz_core_analysis_bbs_info_print(RzCore *core, RzAnalysisFunction *fcn, RzCmdStateOutput *state)
RZ_API void rz_core_analysis_propagate_noreturn(RzCore *core, ut64 addr)
RZ_IPI void rz_core_analysis_function_signature_editor(RzCore *core, ut64 addr)
RZ_API bool rz_core_analysis_function_rename(RzCore *core, ut64 addr, const char *_name)
RZ_API bool rz_core_analysis_graph(RzCore *core, ut64 addr, int opts)
RZ_API st64 rz_core_analysis_coverage_count(RZ_NONNULL RzCore *core)
Compute analysis coverage count.
RZ_API st64 rz_core_analysis_calls_count(RZ_NONNULL RzCore *core)
Compute analysis function xrefs count.
RZ_IPI void rz_core_analysis_function_until(RzCore *core, ut64 addr_end)
RZ_API int rz_core_analysis_fcn(RzCore *core, ut64 at, ut64 from, int reftype, int depth)
RZ_API void rz_core_analysis_resolve_jumps(RZ_NONNULL RzCore *core)
Resolves any unresolved jump.
RZ_API bool rz_core_analysis_rename(RZ_NONNULL RzCore *core, RZ_NONNULL const char *name, ut64 addr)
Rename whatever var/flag/function is used at addr to name.
RZ_IPI bool rz_analysis_var_global_list_show(RzAnalysis *analysis, RzCmdStateOutput *state, RZ_NULLABLE const char *name)
RZ_IPI int fcn_cmpaddr(const void *_a, const void *_b)
RZ_API int rz_core_print_bb_gml(RzCore *core, RzAnalysisFunction *fcn)
RZ_API RzGraph * rz_core_analysis_importxrefs(RzCore *core)
RZ_API RZ_OWN RzCoreAnalysisName * rz_core_analysis_name(RZ_NONNULL RzCore *core, ut64 addr)
Get information on whatever var/flag/function is used at addr.
RZ_API int rz_core_analysis_data(RzCore *core, ut64 addr, int count, int depth, int wordsize)
RZ_API RZ_OWN char * rz_core_analysis_function_autoname(RZ_NONNULL RzCore *core, RZ_NONNULL RzAnalysisFunction *fcn)
Suggest a name for the function.
RZ_API bool rz_core_analysis_sigdb_apply(RZ_NONNULL RzCore *core, RZ_NULLABLE int *n_applied, RZ_NULLABLE const char *filter)
tries to apply the signatures in the flirt.sigdb.path
RZ_API void rz_core_analysis_name_free(RZ_NULLABLE RzCoreAnalysisName *p)
RZ_IPI void rz_core_analysis_fcn_returns(RzCore *core, RzAnalysisFunction *fcn)
RZ_API bool rz_core_analysis_refs(RZ_NONNULL RzCore *core, size_t nbytes)
Analyze xrefs and prints the result.
RZ_API bool rz_core_analysis_hint_set_offset(RZ_NONNULL RzCore *core, RZ_NONNULL const char *struct_member)
Set analysis hint for the first immediate of the instruction at current offset to struct_member.
RZ_IPI bool rz_core_analysis_var_rename(RzCore *core, const char *name, const char *newname)
RZ_API void rz_core_print_func_args(RzCore *core)
RZ_API RzCmdStatus rz_core_asm_plugins_print(RzCore *core, const char *arch, RzCmdStateOutput *state)
RZ_API bool rz_analysis_cc_exist(RzAnalysis *analysis, const char *convention)
RZ_API const char * rz_analysis_cc_default(RzAnalysis *analysis)
RZ_API bool rz_core_esil_cmd(RzAnalysisEsil *esil, const char *cmd, ut64 a1, ut64 a2)
RZ_IPI void rz_core_analysis_esil_emulate(RzCore *core, ut64 addr, ut64 until_addr, int off)
RZ_IPI void rz_core_analysis_esil_init_mem_p(RzCore *core)
RZ_IPI void rz_core_analysis_esil_emulate_bb(RzCore *core)
RZ_IPI bool rz_core_analysis_il_vm_set(RzCore *core, const char *var_name, ut64 value)
Set a vm variable from user input.
RZ_IPI void rz_core_analysis_esil_references_all_functions(RzCore *core)
RZ_API void rz_core_analysis_esil_init_mem(RZ_NONNULL RzCore *core, RZ_NULLABLE const char *name, ut64 addr, ut32 size)
RZ_IPI void rz_core_analysis_esil_default(RzCore *core)
RZ_IPI bool rz_core_analysis_il_step_with_events(RzCore *core, PJ *pj)
RZ_IPI void rz_core_analysis_esil_step_over_until(RzCore *core, ut64 addr)
RZ_IPI bool rz_core_il_step(RzCore *core)
RZ_IPI void rz_core_analysis_il_vm_status(RzCore *core, const char *var_name, RzOutputMode mode)
RZ_IPI int rz_core_analysis_set_reg(RzCore *core, const char *regname, ut64 val)
RZ_API void rz_core_analysis_esil_step_over(RZ_NONNULL RzCore *core)
RZ_API void rz_core_analysis_esil_reinit(RZ_NONNULL RzCore *core)
Reinitialize ESIL.
RZ_API void rz_core_analysis_esil_deinit(RZ_NONNULL RzCore *core)
Deinitialize ESIL.
RZ_IPI void rz_core_analysis_esil_step_over_untilexpr(RzCore *core, const char *expr)
RZ_API void rz_core_analysis_esil_init_mem_del(RZ_NONNULL RzCore *core, RZ_NULLABLE const char *name, ut64 addr, ut32 size)
Remove ESIL VM stack.
RZ_IPI void rz_core_analysis_il_reinit(RzCore *core)
RZ_API RzVector * rz_analysis_class_base_get_all(RzAnalysis *analysis, const char *class_name)
RZ_API RzAnalysisClassErr rz_analysis_class_vtable_delete(RzAnalysis *analysis, const char *class_name, const char *vtable_id)
RZ_API RzAnalysisClassErr rz_analysis_class_method_rename(RzAnalysis *analysis, const char *class_name, const char *old_meth_name, const char *new_meth_name)
RZ_API RzAnalysisClassErr rz_analysis_class_base_set(RzAnalysis *analysis, const char *class_name, RzAnalysisBaseClass *base)
RZ_API RzVector * rz_analysis_class_method_get_all(RzAnalysis *analysis, const char *class_name)
RZ_API void rz_analysis_class_base_fini(RzAnalysisBaseClass *base)
RZ_API bool rz_analysis_class_exists(RzAnalysis *analysis, const char *name)
RZ_API void rz_analysis_class_vtable_fini(RzAnalysisVTable *vtable)
RZ_API RzAnalysisClassErr rz_analysis_class_rename(RzAnalysis *analysis, const char *old_name, const char *new_name)
RZ_API RzAnalysisClassErr rz_analysis_class_method_delete(RzAnalysis *analysis, const char *class_name, const char *meth_name)
RZ_API RzAnalysisClassErr rz_analysis_class_base_delete(RzAnalysis *analysis, const char *class_name, const char *base_id)
RZ_API RzGraph * rz_analysis_class_get_inheritance_graph(RzAnalysis *analysis)
Creates RzGraph from class inheritance information where each node has RzGraphNodeInfo as generic dat...
RZ_API RzAnalysisClassErr rz_analysis_class_vtable_set(RzAnalysis *analysis, const char *class_name, RzAnalysisVTable *vtable)
RZ_API RzAnalysisClassErr rz_analysis_class_method_set(RzAnalysis *analysis, const char *class_name, RzAnalysisMethod *meth)
RZ_API SdbList * rz_analysis_class_get_all(RzAnalysis *analysis, bool sorted)
RZ_API void rz_analysis_class_method_fini(RzAnalysisMethod *meth)
RZ_API RzVector * rz_analysis_class_vtable_get_all(RzAnalysis *analysis, const char *class_name)
RZ_API void rz_analysis_class_foreach(RzAnalysis *analysis, SdbForeachCallback cb, void *user)
RZ_API RzAnalysisClassErr rz_analysis_class_create(RzAnalysis *analysis, const char *name)
RZ_API void rz_analysis_class_delete(RzAnalysis *analysis, const char *name)
RZ_API int rz_core_cmd0(RzCore *core, const char *cmd)
RZ_API void rz_core_cmd_help(const RzCore *core, const char *help[])
RZ_API char * rz_core_cmd_strf(RzCore *core, const char *fmt,...)
RZ_API int rz_core_cmdf(RzCore *core, const char *fmt,...)
RZ_API RzCmdStatus rz_core_cmd0_rzshell(RzCore *core, const char *cmd)
RZ_API char * rz_core_disassemble_instr(RzCore *core, ut64 addr, int l)
RZ_IPI RzCmdStatus rz_analysis_global_variable_add_handler(RzCore *core, int argc, const char **argv)
static void update_stat_for_op(RzCore *core, HtPU *ht, ut64 addr, int mode)
RZ_IPI RzCmdStatus rz_analysis_function_blocks_list_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_analysis_esil_deinit_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analyze_all_functions_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_until_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_vars_del_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_vars_regs_getref_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_blocks_switch_type_handler(RzCore *core, int argc, const char **argv)
RZ_IPI int rz_cmd_analysis(void *data, const char *input)
static int delta_cmp2(const void *a, const void *b)
RZ_IPI RzCmdStatus rz_analysis_function_vars_bp_del_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_import_list_del_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_esil_init_mem_p_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_syscall_dump_c_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_functions_map_handler(RzCore *core, int argc, const char **argv)
static void var_accesses_list(RzAnalysisFunction *fcn, RzAnalysisVar *var, PJ *pj, int access_type, const char *name)
RZ_IPI RzCmdStatus rz_analysis_class_method_add_handler(RzCore *core, int argc, const char **argv)
static void fcn_list_print_info(RzCore *core, RzList *fcns, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_analyse_name_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI void rz_core_agraph_print_write(RzCore *core, const char *filename)
RZ_IPI RzCmdStatus rz_analysis_print_rtti_all_handler(RzCore *core, int argc, const char **argv, RzOutputMode mode)
static RzFlagItem * core_flag_get_at_as_ref_type(RzCore *core, RzAnalysisXRef *xrefi)
RZ_IPI RzCmdStatus rz_analysis_basic_block_info_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_analyze_all_functions_esil_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_il_step_until_addr_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_list_mne_handler(RzCore *core, int argc, const char **argv)
static int var_comparator(const RzAnalysisVar *a, const RzAnalysisVar *b)
RZ_IPI RzCmdStatus rz_analysis_hint_del_all_handler(RzCore *core, int argc, const char **argv)
static bool analysis_fcn_data(RzCore *core, const char *input)
RZ_IPI RzCmdStatus rz_analysis_all_esil_handler(RzCore *core, int argc, const char **argv)
static void rz_analysis_aefa(RzCore *core, const char *arg)
static RzList * get_calls(RzAnalysisBlock *block)
RZ_IPI RzCmdStatus rz_il_vm_step_until_addr_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_hint_set_high_handler(RzCore *core, int argc, const char **argv)
static const char * xref_type2cmd(RzAnalysisXRefType type)
RZ_API bool rz_core_esil_continue_back(RZ_NONNULL RzCore *core)
RZ_IPI RzCmdStatus rz_analysis_hint_del_immbase_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analyze_everything_experimental_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_recover_rtti_all_handler(RzCore *core, int argc, const char **argv)
RZ_API void rz_core_analysis_calls(RZ_NONNULL RzCore *core, bool imports_only)
static void function_list_print(RzCore *core, RzList *list)
RZ_IPI RzCmdStatus rz_analysis_function_cc_reg_usage_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_analysis_hint_del_handler(RzCore *core, int argc, const char **argv)
static void cmd_agraph_edge(RzCore *core, const char *input)
RZ_IPI RzCmdStatus rz_analysis_hint_del_optype_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_signature_type_handler(RzCore *core, int argc, const char **argv)
static RzCmdStatus class_error(RzAnalysisClassErr err)
RZ_IPI RzCmdStatus rz_analysis_function_autoname_handler(RzCore *core, int argc, const char **argv)
#define PRINTF_LN(k, fmt, arg)
static void print_graph_agg(RzGraph *graph)
RZ_IPI RzCmdStatus rz_analysis_hint_set_esil_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_hint_set_ptr_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_class_add_handler(RzCore *core, int argc, const char **argv)
static void cmd_analysis_ucall_ref(RzCore *core, ut64 addr)
RZ_IPI RzCmdStatus rz_analysis_hint_del_size_handler(RzCore *core, int argc, const char **argv)
static void __analysis_esil_function(RzCore *core, ut64 addr)
static void fcn_list_bbs(RzAnalysisFunction *fcn)
static bool analyze_function_at_flag(RzFlagItem *fi, RzCore *core)
RZ_IPI RzCmdStatus rz_analysis_xrefs_graph_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_analysis_esil_init_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_delete_global_imports_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
static void core_perform_auto_analysis(RzCore *core, CoreAnalysisType type)
RZ_IPI RzCmdStatus rz_analysis_function_blocks_del_all_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_analyze_args_handler(RzCore *core, int argc, const char **argv)
static char diff_type_to_char(RzAnalysisDiff *diff)
static int myregwrite(RzAnalysisEsil *esil, const char *name, ut64 *val)
RZ_IPI RzCmdStatus rz_analysis_function_blocks_color_handler(RzCore *core, int argc, const char **argv)
static void function_print_to_json(RzCore *core, RzAnalysisFunction *fcn, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_analysis_global_variable_delete_byaddr_handler(RzCore *core, int argc, const char **argv)
static void rz_core_graph_print(RzCore *core, RzGraph *graph, int use_utf, bool use_offset, const char *input)
static bool analysis_class_print_to_json_cb(void *user, const char *k, const char *v)
static void function_list_print_as_cmd(RzCore *core, RzList *list, RzCmdStateOutput *state)
static void showregs(RzList *list)
RZ_IPI RzCmdStatus rz_analysis_hint_del_stackframe_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_xrefs_set_d_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_hint_del_val_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_stacksz_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_display_opcode_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analyze_all_unresolved_jumps_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_global_variable_delete_byname_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_hint_list_at_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_il_vm_step_handler(RzCore *core, int argc, const char **argv)
static int RzAnalysisRef_cmp(const RzAnalysisXRef *xref1, const RzAnalysisXRef *xref2)
RZ_IPI RzCmdStatus rz_analysis_appcall_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_syscall_dump_assembly_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analyze_value_to_maps_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_analysis_function_vars_regs_del_all_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_setbits_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_class_list_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_analyze_function_linked_offsets_handler(RzCore *core, int argc, const char **argv)
static bool _aeli_iter(void *user, const ut64 key, const void *value)
static void cmd_analysis_graph(RzCore *core, const char *input)
static int mymemread(RzAnalysisEsil *esil, ut64 addr, ut8 *buf, int len)
static RzCmdStatus syscalls_dump(RzCore *core, int argc, const char **argv, bool is_c)
RZ_IPI RzCmdStatus rz_analysis_xrefs_copy_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_vars_xrefs_args_handler(RzCore *core, int argc, const char **argv, RzOutputMode mode)
RZ_IPI RzCmdStatus rz_il_step_skip_until_addr_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_blocks_edge_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_signature_editor_handler(RzCore *core, int argc, const char **argv)
static RzCmdStatus analysis_function_vars_accesses(RzCore *core, int access_type, const char *varname)
RZ_IPI RzCmdStatus rz_analysis_function_list_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_analysis_hint_set_val_handler(RzCore *core, int argc, const char **argv)
static void cmd_analysis_esil(RzCore *core, const char *input)
RZ_IPI RzCmdStatus rz_analyze_n_ins_size_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_vars_bp_getref_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_vars_display_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_class_vtable_lookup_handler(RzCore *core, int argc, const char **argv)
static bool listOpDescriptions(void *_core, const char *k, const char *v)
static void xrefs_graph_fcn_start_json(PJ *pj, RzAnalysisFunction *fcn, ut64 addr)
static char * fcnjoin(RzList *list)
static void function_list_print_quiet(RZ_UNUSED RzCore *core, RzList *list)
RZ_IPI RzCmdStatus rz_analysis_hint_del_high_handler(RzCore *core, int argc, const char **argv)
static void cmd_agraph_node(RzCore *core, const char *input)
static void xrefs_graph(RzCore *core, ut64 addr, int level, HtUU *ht, RzOutputMode mode, PJ *pj)
static RzCmdStatus analysis_function_vars_getsetref(RzCore *core, int delta, ut64 addr, RzAnalysisVarKind kind, RzAnalysisVarAccessType access_type)
static bool print_cmd_analysis_after_traps_print(RZ_NONNULL RzCore *core, ut64 n_bytes)
RZ_IPI RzCmdStatus rz_il_step_until_expr_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_blocks_add_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analyze_recursively_all_function_types_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analyze_all_objc_references_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_vars_bp_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
------— Base pointer based variable handlers ----------—
RZ_IPI RzCmdStatus rz_analysis_xrefs_list_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_il_step_over_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_class_base_del_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_global_imports_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_analysis_xrefs_from_list_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_analysis_continue_until_breakpoint_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_class_graph_handler(RzCore *core, int argc, const char **argv)
static RzCmdStatus class_method_error(RzAnalysisClassErr err)
static RzCmdStatus class_vtable_error(RzAnalysisClassErr err)
RZ_IPI RzCmdStatus rz_analysis_syscall_print_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_analysis_function_vars_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
static void function_list_print_to_table(RzCore *core, RzList *list, RzTable *t, bool verbose)
RZ_IPI RzCmdStatus rz_analysis_function_opcode_stat_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_analyze_n_ins_esil_handler(RzCore *core, int argc, const char **argv)
static bool convert_dot_to_image(RzCore *core, const char *dot_file, const char *save_path)
static void showregs_json(RzList *list, PJ *pj)
static RzCmdStatus analysis_function_vars_del_all(RzCore *core, RzAnalysisVarKind kind)
RZ_IPI RzCmdStatus rz_analysis_esil_init_p_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_convert_mne_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_vars_regs_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
------— Register-based variable handlers ----------—
RZ_IPI RzCmdStatus rz_analysis_function_analyze_jmptable_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_xrefs_del_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_class_vtable_add_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_import_list_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analyze_n_bytes_desc_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_hint_del_ptr_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_class_info_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_analysis_class_rename_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_hint_set_immbase_handler(RzCore *core, int argc, const char **argv)
static const char * syscallNumber(int n)
RZ_IPI RzCmdStatus rz_analysis_function_strings_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_analysis_function_blocks_asciiart_handler(RzCore *core, int argc, const char **argv)
static bool contains(RzList *list, const char *name)
RZ_IPI RzCmdStatus rz_analysis_function_vars_regs_del_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_list_calls_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
static void aea_stats_fini(AeaStats *stats)
static void showmem_json(RzList *list, PJ *pj)
static void function_list_print_to_json(RzCore *core, RzList *list, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_analysis_function_add_recu_handler(RzCore *core, int argc, const char **argv)
static bool convert_dotcmd_to_image(RzCore *core, char *rz_cmd, const char *save_path)
static ut64 initializeEsil(RzCore *core)
static void ht_inc(HtPU *ht, const char *key)
static const char * help_detail_ae[]
static bool cmd_aea(RzCore *core, int mode, ut64 addr, int length)
static int esil_cost(RzCore *core, ut64 addr, const char *expr)
RZ_IPI RzCmdStatus rz_analyze_opcode_handler(RzCore *core, int argc, const char **argv)
static void analysis_class_print_to_json(RzAnalysis *analysis, PJ *pj, const char *class_name)
static bool analysis_fcn_data_gaps(RzCore *core, const char *input)
RZ_IPI RzCmdStatus rz_autoname_all_functions_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_rename_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_xrefs_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_analysis_class_vtable_del_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analyze_simple_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_vars_sp_getref_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analyze_n_bytes_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_analysis_function_vars_detect_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_describe_offset_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_rtti_demangle_class_name_handler(RzCore *core, int argc, const char **argv)
static void core_analysis_bytes_json(RzCore *core, const ut8 *buf, int len, int nops, PJ *pj)
RZ_IPI RzCmdStatus rz_analysis_global_variable_retype_handler(RzCore *core, int argc, const char **argv)
static const char * help_msg_aea[]
static int mymemwrite(RzAnalysisEsil *esil, ut64 addr, const ut8 *buf, int len)
RZ_IPI RzCmdStatus rz_analyze_all_preludes_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_type_matching_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_hint_del_ret_handler(RzCore *core, int argc, const char **argv)
static bool list_keys_cb(RzList *list, char *k, RZ_UNUSED ut64 v)
RZ_IPI RzCmdStatus rz_il_step_skip_until_expr_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_autoname_all_functions_noreturn_handler(RzCore *core, int argc, const char **argv)
RZ_API int rz_core_esil_step_back(RzCore *core)
RZ_IPI RzCmdStatus rz_analysis_list_vtables_handler(RzCore *core, int argc, const char **argv, RzOutputMode mode)
RZ_IPI RzCmdStatus rz_analysis_basic_block_find_paths_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
static void cmd_analysis_trampoline(RzCore *core, const char *input)
static void fcn_print_info(RzCore *core, RzAnalysisFunction *fcn, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_analysis_function_vars_xrefs_handler(RzCore *core, int argc, const char **argv, RzOutputMode mode)
RZ_IPI RzCmdStatus rz_analysis_function_vars_bp_del_all_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analyze_n_bytes_size_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_info_show_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_analysis_xrefs_to_graph_cmd_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_count_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_class_base_list_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_il_step_until_opt_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_list_struct_offsets_handler(RzCore *core, int argc, const char **argv)
static RzCmdStatus analysis_function_vars_kind_list(RzCore *core, RzAnalysisFunction *fcn, RzAnalysisVarKind kind, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_il_step_handler(RzCore *core, int argc, const char **argv)
static char * ut64join(RzList *list)
RZ_IPI RzCmdStatus rz_analysis_hint_del_arch_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_size_sum_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_continue_until_syscall_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_hint_set_opcode_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_create_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_esil_init_mem_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_signature_handler(RzCore *core, int argc, const char **argv, RzOutputMode mode)
RZ_IPI RzCmdStatus rz_analyze_all_function_calls_to_imports_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_cc_load_handler(RzCore *core, int argc, const char **argv)
#define PJ_KN(pj, key, value)
RZ_API void rz_core_agraph_print(RzCore *core, int use_utf, const char *input)
static void xrefs_list_print(RzCore *core, RzList *list)
RZ_IPI RzCmdStatus rz_print_analysis_details_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_analysis_hint_set_jump_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_cc_set_get_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_list_ascii_handler(RzCore *core, int argc, const char **argv)
static RzList * get_xrefs(RzAnalysisBlock *block)
RZ_IPI RzCmdStatus rz_analysis_class_base_add_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_hint_set_fail_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_hint_list_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_il_vm_step_with_events_handler(RzCore *core, int argc, const char **argv, RzOutputMode mode)
RZ_IPI RzCmdStatus rz_analyze_symbols_entries_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_vars_sp_del_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_continue_until_esil_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_apply_signatures_from_sigdb_handler(RzCore *core, int argc, const char **argv)
static RzCmdStatus xrefs_set(RzCore *core, int argc, const char **argv, RzAnalysisXRefType type)
RZ_IPI RzCmdStatus rz_analysis_class_del_handler(RzCore *core, int argc, const char **argv)
static int delta_cmp(const void *a, const void *b)
static const char * help_msg_ad[]
RZ_IPI RzCmdStatus rz_analysis_function_args_and_vars_xrefs_handler(RzCore *core, int argc, const char **argv, RzOutputMode mode, bool use_args, bool use_vars)
static char * print_graph_dot(RzCore *core, RzGraph *graph)
static bool convert_dot_str_to_image(RzCore *core, char *str, const char *save_path)
RZ_IPI RzCmdStatus rz_analysis_xrefs_set_0_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analyze_all_consecutive_functions_in_section_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_il_trace_stop_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_continue_until_except_handler(RzCore *core, int argc, const char **argv)
static void analysis_class_print_as_cmd(RzAnalysis *analysis, const char *class_name)
static const char _handler_no_name[]
RZ_IPI RzCmdStatus rz_analysis_syscall_show_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_print_commands_after_traps_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analyze_n_bytes_esil_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_xrefs_set_c_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_hint_set_offset_handler(RzCore *core, int argc, const char **argv)
static int mw(RzAnalysisEsil *esil, ut64 addr, const ut8 *buf, int len)
static RzAnalysisFunction * analysis_get_function_in(RzAnalysis *analysis, ut64 offset)
Helper to get function in offset.
RZ_IPI RzCmdStatus rz_il_step_back_handler(RzCore *core, int argc, const char **argv)
static void xref_list_print_as_cmd(RZ_UNUSED RzCore *core, RzList *list)
RZ_IPI RzCmdStatus rz_analysis_function_vars_type_handler(RzCore *core, int argc, const char **argv)
static void core_analysis_var_list_show(RzAnalysis *analysis, RzAnalysisFunction *fcn, int kind, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_analysis_function_vars_regs_setref_handler(RzCore *core, int argc, const char **argv)
static void core_analysis_bytes_esil(RzCore *core, const ut8 *buf, int len, int nops)
RZ_IPI RzCmdStatus rz_analyze_all_data_references_to_code_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_vars_dis_refs_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_il_vm_initialize_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_class_method_rename_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_vars_xrefs_vars_handler(RzCore *core, int argc, const char **argv, RzOutputMode mode)
RZ_IPI RzCmdStatus rz_il_trace_start_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_hint_del_bits_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_hint_del_offset_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_hint_set_optype_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analyze_symbols_entries_flags_handler(RzCore *core, int argc, const char **argv)
static char * dot_executable_path(void)
RZ_IPI RzCmdStatus rz_analysis_syscall_name_handler(RzCore *core, int argc, const char **argv)
static void syscall_dump(RzSyscallItem *si, bool is_c)
#define PRINTF_LN_STR(k, arg)
static void print_trampolines(RzCore *core, ut64 a, ut64 b, size_t element_size)
RZ_IPI RzCmdStatus rz_analysis_hint_set_ret_handler(RzCore *core, int argc, const char **argv)
static void core_analysis_bytes_desc(RzCore *core, const ut8 *buf, int len, int nops)
RZ_IPI RzCmdStatus rz_analysis_syscall_number_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_continue_until_addr_handler(RzCore *core, int argc, const char **argv)
static bool core_analysis_name_print(RzCore *core, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_analysis_global_variable_rename_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_hint_del_opcode_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analyze_everything_handler(RzCore *core, int argc, const char **argv)
static void showmem(RzList *list)
static char function_type_to_char(RzAnalysisFunction *fcn)
RZ_IPI RzCmdStatus rz_analysis_function_vars_bp_setref_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_xrefs_set_s_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_hint_set_bits_handler(RzCore *core, int argc, const char **argv)
static void cmd_address_info(RzCore *core, const ut64 addr, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_analysis_xrefs_to_list_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
static void gather_opcode_stat_for_fcn(RzCore *core, HtPU *ht, RzAnalysisFunction *fcn, int mode)
RZ_IPI RzCmdStatus rz_il_step_skip_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_il_step_over_until_addr_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_hint_set_size_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_esil_init_mem_remove_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_list_in_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_il_step_evaluate_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_hint_del_syntax_handler(RzCore *core, int argc, const char **argv)
static void core_analysis_bytes_size(RzCore *core, const ut8 *buf, int len, int nops)
RZ_IPI RzCmdStatus rz_print_areas_no_functions_handler(RzCore *core, int argc, const char **argv)
static void analysis_class_print(RzAnalysis *analysis, const char *class_name, bool detailed)
RZ_IPI RzCmdStatus rz_analysis_continue_until_call_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_recover_all_golang_functions_strings_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_vars_rename_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_print_global_variable_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_analysis_class_method_del_handler(RzCore *core, int argc, const char **argv)
static void _analysis_calls(RzCore *core, ut64 addr, ut64 addr_end, bool importsOnly)
static RzCmdStatus analysis_function_vars_del(RzCore *core, RzAnalysisVarKind kind, const char *varname)
RZ_IPI RzCmdStatus rz_analysis_function_vars_stackframe_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analyze_all_function_calls_handler(RzCore *core, int argc, const char **argv)
static void fcn_print_trace_info(RzDebugTrace *traced, RzAnalysisFunction *fcn)
RZ_IPI RzCmdStatus rz_analysis_function_del_handler(RzCore *core, int argc, const char **argv)
static void list_vars(RzCore *core, RzAnalysisFunction *fcn, PJ *pj, int type, const char *name, RzVarListType vlt)
RZ_IPI RzCmdStatus rz_analysis_hint_del_fail_handler(RzCore *core, int argc, const char **argv)
static const char * help_msg_a[]
static const char * help_msg_agn[]
RZ_IPI RzCmdStatus rz_analysis_basic_block_list_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_analysis_function_vars_writes_handler(RzCore *core, int argc, const char **argv)
#define PRINTF_LN_NOT(k, fmt, arg, notv)
RZ_IPI RzCmdStatus rz_analysis_function_info_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_list_signatures_in_sigdb_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_API bool rz_core_esil_dumpstack(RzAnalysisEsil *esil)
RZ_IPI RzCmdStatus rz_analysis_function_blocks_info_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
static const char * help_msg_ae[]
static const char * help_msg_age[]
RZ_IPI RzCmdStatus rz_analysis_function_blocks_del_handler(RzCore *core, int argc, const char **argv)
#define PJ_KS(pj, key, value)
RZ_IPI RzCmdStatus rz_analyze_xrefs_section_bytes_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_hint_set_arch_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_vars_sp_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
------— Stack-based variable handlers ----------—
RZ_IPI RzCmdStatus rz_analysis_hint_del_esil_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_functions_merge_handler(RzCore *core, int argc, const char **argv)
@ CORE_ANALYSIS_EXPERIMENTAL
aaaa
RZ_IPI RzCmdStatus rz_analysis_function_all_opcode_stat_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_analysis_function_vars_sp_setref_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_xrefs_set_C_handler(RzCore *core, int argc, const char **argv)
static int myregread(RzAnalysisEsil *esil, const char *name, ut64 *val, int *len)
RZ_IPI RzCmdStatus rz_analysis_function_del_all_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analyze_cycles_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_class_vtable_list_handler(RzCore *core, int argc, const char **argv)
static int cmpaddr(const void *_a, const void *_b)
RZ_IPI RzCmdStatus rz_analysis_hint_del_jump_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_hint_set_stackframe_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_list_plugins_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_analyze_n_ins_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_analyze_bytes_handler(RzCore *core, int argc, const char **argv, RzCmdStateOutput *state)
static char * getViewerPath(void)
RZ_IPI RzCmdStatus rz_analysis_print_rtti_handler(RzCore *core, int argc, const char **argv, RzOutputMode mode)
static void xref_list_print_to_json(RZ_UNUSED RzCore *core, RzList *list, PJ *pj)
static void list_all_functions_at_vtable_offset(RzAnalysis *analysis, const char *class_name, ut64 offset)
RZ_IPI RzCmdStatus rz_analysis_function_returns_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_il_vm_status_handler(RzCore *core, int argc, const char **argv, RzOutputMode mode)
static const char * help_msg_ag[]
RZ_IPI RzCmdStatus rz_analysis_function_vars_reads_handler(RzCore *core, int argc, const char **argv)
RZ_IPI RzCmdStatus rz_analysis_function_address_handler(RzCore *core, int argc, const char **argv, RzOutputMode mode)
static void log_err_nonexist_class()
static void print_stats(RzCore *core, HtPU *ht, RzAnalysisFunction *fcn, RzCmdStateOutput *state)
RZ_IPI RzCmdStatus rz_analysis_xrefs_del_all_handler(RzCore *core, int argc, const char **argv)
static void xref_print_to_json(RZ_UNUSED RzCore *core, RzAnalysisXRef *xref, PJ *pj)
static void aea_stats_init(AeaStats *stats)
RZ_IPI RzCmdStatus rz_analysis_all_esil_functions_handler(RzCore *core, int argc, const char **argv)
RZ_API int rz_core_esil_step(RzCore *core, ut64 until_addr, const char *until_expr, ut64 *prev_addr, bool stepOver)
static bool add_keys_to_set_cb(HtPU *ht, const char *k, RZ_UNUSED const ut64 v)
static void core_analysis_bytes_standard(RzCore *core, const ut8 *buf, int len, int nops)
RZ_IPI RzCmdStatus rz_analysis_hint_set_syntax_handler(RzCore *core, int argc, const char **argv)
static void function_print_calls(RzCore *core, RzList *fcns, RzCmdStateOutput *state)
static void analysis_class_list_print_to_json(RzAnalysis *analysis, PJ *pj)
static int mr(RzAnalysisEsil *esil, ut64 addr, ut8 *buf, int len)
static RzCmdStatus class_base_error(RzAnalysisClassErr err)
static const char * diff_type_to_str(RzAnalysisDiff *diff)
RZ_IPI RzCmdStatus rz_analysis_function_cc_list_handler(RzCore *core, int argc, const char **argv, RzOutputMode mode)
RZ_API bool rz_cmd_state_output_init(RZ_NONNULL RzCmdStateOutput *state, RzOutputMode mode)
Initialize a RzCmdStateOutput structure and its inner fields based on the provided mode.
RZ_API void rz_cmd_state_output_set_columnsf(RzCmdStateOutput *state, const char *fmt,...)
Specify the columns of the command output.
RZ_API void rz_cmd_state_output_array_start(RzCmdStateOutput *state)
Mark the start of an array of elements in the output.
RZ_API void rz_cmd_state_output_fini(RZ_NONNULL RzCmdStateOutput *state)
Clear the inner fields of RzCmdStateOutput structure, but do not free it.
RZ_API void rz_cmd_state_output_array_end(RzCmdStateOutput *state)
Mark the end of an array of elements in the output.
static bool step_until_optype(RzCore *core, RzList *optypes_list)
RZ_API RZ_OWN RzList * rz_core_get_boundaries_prot(RzCore *core, int perm, const char *mode, const char *prefix)
RZ_API int rz_core_search_preludes(RzCore *core, bool log)
RZ_IPI bool rz_core_seek_to_register(RzCore *core, const char *regname, bool is_silent)
RZ_API ut64 rz_config_get_i(RzConfig *cfg, RZ_NONNULL const char *name)
RZ_API bool rz_config_get_b(RzConfig *cfg, RZ_NONNULL const char *name)
RZ_API RzConfigNode * rz_config_set(RzConfig *cfg, RZ_NONNULL const char *name, const char *value)
RZ_API RzConfigNode * rz_config_set_i(RzConfig *cfg, RZ_NONNULL const char *name, const ut64 i)
RZ_API RZ_BORROW const char * rz_config_get(RzConfig *cfg, RZ_NONNULL const char *name)
RZ_API RzConfigNode * rz_config_set_b(RzConfig *cfg, RZ_NONNULL const char *name, bool value)
RZ_API void rz_cons_break_timeout(int timeout)
RZ_API int rz_cons_get_size(int *rows)
RZ_API void rz_cons_enable_highlight(const bool enable)
RZ_API bool rz_cons_enable_mouse(const bool enable)
RZ_API void rz_cons_clear_line(int std_err)
RZ_API void rz_cons_newline(void)
RZ_API void rz_cons_break_pop(void)
RZ_API void rz_cons_break_push(RzConsBreak cb, void *user)
RZ_API int rz_cons_printf(const char *format,...)
RZ_API bool rz_cons_is_interactive(void)
RZ_API void rz_cons_show_cursor(int cursor)
RZ_API void rz_cons_flush(void)
RZ_API bool rz_cons_is_breaked(void)
RZ_API void rz_cons_println(const char *str)
RZ_API bool rz_core_analysis_recover_golang_functions(RzCore *core)
reads pclntab table in go binaries and recovers functions. Follows the code https://github....
RZ_API void rz_core_analysis_resolve_golang_strings(RzCore *core)
Attempts to recover all golang string.
static RzCmdStatus bool2status(bool val)
RZ_IPI void rz_core_types_calling_conventions_print(RzCore *core, RzOutputMode mode)
RZ_API void rz_core_reg_update_flags(RzCore *core)
Update or create flags for all registers where it makes sense.
RZ_API RZ_OWN char * rz_core_syscall_as_string(RzCore *core, st64 n, ut64 addr)
Returns the syscall representation as a string.
RZ_API void rz_core_link_stroff(RzCore *core, RzAnalysisFunction *fcn)
static static fork const void static count static fd const char const char static newpath const char static path const char path
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 static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void count
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
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 static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len key
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 static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec struct timespec static rem const char static group const void length
RZ_API const char * rz_analysis_datatype_to_string(RzAnalysisDataType t)
RZ_API const char * rz_analysis_data_kind(RzAnalysis *a, ut64 addr, const ut8 *buf, int len)
RZ_API RZ_OWN char * rz_core_disasm_instruction(RzCore *core, ut64 addr, ut64 reladdr, RZ_NULLABLE RzAnalysisFunction *fcn, bool color)
Returns a disassembly of one instruction.
RZ_API int rz_core_print_disasm_instructions(RzCore *core, int nb_bytes, int nb_opcodes)
size_t map(int syms, int left, int len)
RZ_API void rz_analysis_esil_stack_free(RzAnalysisEsil *esil)
RZ_API RzAnalysisEsil * rz_analysis_esil_new(int stacksize, int iotrap, unsigned int addrsize)
RZ_API int rz_analysis_esil_condition(RzAnalysisEsil *esil, const char *str)
RZ_API bool rz_analysis_esil_set_pc(RzAnalysisEsil *esil, ut64 addr)
RZ_API const char * rz_analysis_esil_trapstr(int type)
RZ_API bool rz_analysis_esil_setup(RzAnalysisEsil *esil, RzAnalysis *analysis, int romem, int stats, int nonull)
RZ_API bool rz_analysis_esil_parse(RzAnalysisEsil *esil, const char *str)
RZ_API void rz_analysis_esil_free(RzAnalysisEsil *esil)
RZ_API bool rz_analysis_esil_load_interrupts_from_lib(RzAnalysisEsil *esil, const char *path)
RZ_API void rz_analysis_esil_trace_restore(RzAnalysisEsil *esil, int idx)
RZ_API int rz_analysis_fcn_del(RzAnalysis *a, ut64 addr)
RZ_API ut32 rz_analysis_function_cost(RzAnalysisFunction *fcn)
RZ_API int rz_analysis_function_loops(RzAnalysisFunction *fcn)
RZ_DEPRECATE RZ_API RzAnalysisFunction * rz_analysis_get_fcn_in(RzAnalysis *analysis, ut64 addr, int type)
RZ_API bool rz_analysis_function_purity(RzAnalysisFunction *fcn)
RZ_API char * rz_analysis_function_get_json(RzAnalysisFunction *function)
RZ_API bool rz_analysis_fcn_add_bb(RzAnalysis *a, RzAnalysisFunction *fcn, ut64 addr, ut64 size, ut64 jump, ut64 fail, RZ_BORROW RzAnalysisDiff *diff)
RZ_DEPRECATE RZ_API RzAnalysisFunction * rz_analysis_get_fcn_in_bounds(RzAnalysis *analysis, ut64 addr, int type)
RZ_API int rz_analysis_function_count_edges(const RzAnalysisFunction *fcn, RZ_NULLABLE int *ebbs)
RZ_API void rz_analysis_del_jmprefs(RzAnalysis *analysis, RzAnalysisFunction *fcn)
RZ_API const char * rz_analysis_fcntype_tostring(int type)
RZ_API int rz_analysis_fcn_del_locs(RzAnalysis *analysis, ut64 addr)
RZ_API int rz_analysis_function_complexity(RzAnalysisFunction *fcn)
RZ_API RZ_OWN char * rz_analysis_function_get_signature(RZ_NONNULL RzAnalysisFunction *function)
RZ_API RzFlagItem * rz_flag_get_i(RzFlag *f, ut64 off)
RZ_API int rz_flag_count(RzFlag *f, const char *glob)
RZ_API void rz_flag_unset_all_in_space(RzFlag *f, const char *space_name)
Unset all flag items in the space with the given name.
RZ_API RzFlagItem * rz_flag_get_at(RzFlag *f, ut64 off, bool closest)
RZ_API RzFlagItem * rz_flag_get_by_spaces(RzFlag *f, ut64 off,...)
RZ_API void rz_flag_foreach_glob(RzFlag *f, const char *glob, RzFlagItemCb cb, void *user)
RZ_API char * sdb_fmt(const char *fmt,...)
RZ_API bool rz_core_gdiff_function_1_file(RzCore *c, ut64 addr, ut64 addr2)
Calculates basic block differences of 2 functions within the same file.
RZ_API RZ_OWN RzType * rz_type_identifier_of_base_type(const RzTypeDB *typedb, RZ_NONNULL const RzBaseType *btype, bool is_const)
Creates a new RzType indentifier from the given RzBaseType.
RZ_API RZ_BORROW const char * rz_type_cond_tostring(RzTypeCond cc)
RzTypeCond enum to string.
RZ_API void rz_analysis_hint_set_val(RzAnalysis *a, ut64 addr, ut64 v)
RZ_API void rz_analysis_hint_set_nword(RzAnalysis *a, ut64 addr, int nword)
RZ_API RzAnalysisHint * rz_analysis_hint_get(RzAnalysis *a, ut64 addr)
RZ_API void rz_analysis_hint_set_high(RzAnalysis *a, ut64 addr)
RZ_API void rz_analysis_hint_clear(RzAnalysis *a)
RZ_API void rz_analysis_hint_unset_stackframe(RzAnalysis *a, ut64 addr)
RZ_API void rz_analysis_hint_unset_type(RzAnalysis *a, ut64 addr)
RZ_API void rz_analysis_hint_set_stackframe(RzAnalysis *a, ut64 addr, ut64 size)
RZ_API void rz_analysis_hint_unset_fail(RzAnalysis *a, ut64 addr)
RZ_API void rz_analysis_hint_set_ret(RzAnalysis *a, ut64 addr, ut64 val)
RZ_API void rz_analysis_hint_unset_offset(RzAnalysis *a, ut64 addr)
RZ_API void rz_analysis_hint_unset_size(RzAnalysis *a, ut64 addr)
RZ_API void rz_analysis_hint_unset_syntax(RzAnalysis *a, ut64 addr)
RZ_API void rz_analysis_hint_unset_jump(RzAnalysis *a, ut64 addr)
RZ_API void rz_analysis_hint_set_jump(RzAnalysis *a, ut64 addr, ut64 jump)
RZ_API void rz_analysis_hint_unset_arch(RzAnalysis *a, ut64 addr)
RZ_API void rz_analysis_hint_set_opcode(RzAnalysis *a, ut64 addr, const char *opcode)
RZ_API void rz_analysis_hint_set_bits(RzAnalysis *a, ut64 addr, int bits)
RZ_API void rz_analysis_hint_free(RzAnalysisHint *h)
RZ_API void rz_analysis_hint_set_syntax(RzAnalysis *a, ut64 addr, const char *syn)
RZ_API void rz_analysis_hint_del(RzAnalysis *a, ut64 addr, ut64 size)
RZ_API void rz_analysis_hint_set_fail(RzAnalysis *a, ut64 addr, ut64 fail)
RZ_API void rz_analysis_hint_unset_opcode(RzAnalysis *a, ut64 addr)
RZ_API void rz_analysis_hint_unset_esil(RzAnalysis *a, ut64 addr)
RZ_API void rz_analysis_hint_set_esil(RzAnalysis *a, ut64 addr, const char *esil)
RZ_API void rz_analysis_hint_unset_immbase(RzAnalysis *a, ut64 addr)
RZ_API void rz_analysis_hint_unset_bits(RzAnalysis *a, ut64 addr)
RZ_API void rz_analysis_hint_unset_ret(RzAnalysis *a, ut64 addr)
RZ_API void rz_analysis_hint_unset_high(RzAnalysis *a, ut64 addr)
RZ_API void rz_analysis_hint_set_arch(RzAnalysis *a, ut64 addr, RZ_NULLABLE const char *arch)
RZ_API void rz_analysis_hint_set_immbase(RzAnalysis *a, ut64 addr, int base)
RZ_API void rz_analysis_hint_set_type(RzAnalysis *a, ut64 addr, int type)
RZ_API void rz_analysis_hint_unset_val(RzAnalysis *a, ut64 addr)
RZ_API void rz_analysis_hint_unset_pointer(RzAnalysis *a, ut64 addr)
RZ_API void rz_analysis_hint_set_pointer(RzAnalysis *a, ut64 addr, ut64 ptr)
RZ_API void rz_analysis_hint_set_size(RzAnalysis *a, ut64 addr, ut64 size)
RZ_API void rz_config_hold_restore(RzConfigHold *h)
Restore whatever config options were previously saved in h.
RZ_API RzConfigHold * rz_config_hold_new(RzConfig *cfg)
Create an opaque object to save/restore some configuration options.
RZ_API bool rz_config_hold_i(RzConfigHold *h,...)
Save the current values of a list of config options that have integer values.
RZ_API void rz_config_hold_free(RzConfigHold *h)
Free a RzConfigHold object h.
RZ_API void Ht_() free(HtName_(Ht) *ht)
RZ_API const KEY_TYPE bool * found
RZ_API void rz_il_op_effect_json(RZ_NONNULL RzILOpEffect *op, RZ_NONNULL PJ *pj)
RZ_API void rz_il_op_effect_stringify(RZ_NONNULL RzILOpEffect *op, RZ_NONNULL RzStrBuf *sb)
RZ_API bool rz_analysis_jmptbl(RzAnalysis *analysis, RzAnalysisFunction *fcn, RzAnalysisBlock *block, ut64 jmpaddr, ut64 table, ut64 tablesize, ut64 default_addr)
return memset(p, 0, total)
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
const char * spaces(int count)
RZ_API RzTable * rz_core_table(RzCore *core)
RZ_API RzBinReloc * rz_core_getreloc(RzCore *core, ut64 addr, int size)
RZ_API void rz_core_notify_begin(RZ_NONNULL RzCore *core, RZ_NONNULL const char *format,...)
Prints a message definining the beginning of a task.
RZ_API bool rz_core_block_size(RzCore *core, ut32 bsize)
RZ_API void rz_core_notify_done(RZ_NONNULL RzCore *core, RZ_NONNULL const char *format,...)
Prints a message definining the end of a task which succeeded.
static void list(RzEgg *egg)
RZ_API RZ_OWN RzList * rz_list_uniq(RZ_NONNULL const RzList *list, RZ_NONNULL RzListComparator cmp)
Returns a new RzList which contains only unique values.
RZ_API RZ_OWN RzList * rz_list_newf(RzListFree f)
Returns a new initialized RzList pointer and sets the free method.
RZ_API RZ_OWN RzList * rz_list_clone(RZ_NONNULL const RzList *list)
Shallow copies of the list (but doesn't free its elements)
RZ_API RZ_OWN RzList * rz_list_new_from_array(RZ_NONNULL const void **arr, size_t arr_size)
Allocates a new RzList and adds an array elements to it.
RZ_API RZ_OWN void * rz_list_pop(RZ_NONNULL RzList *list)
Removes and returns the last element of the list.
RZ_API RZ_OWN RzList * rz_list_new(void)
Returns a new initialized RzList pointer (free method is not initialized)
RZ_API void rz_list_sort(RZ_NONNULL RzList *list, RZ_NONNULL RzListComparator cmp)
Sorts via merge sort or via insertion sort a list.
RZ_API RZ_BORROW void * rz_list_first(RZ_NONNULL const RzList *list)
Returns the first element of the list.
RZ_API RZ_BORROW RzListIter * rz_list_push(RZ_NONNULL RzList *list, void *item)
Alias for rz_list_append.
RZ_API ut32 rz_list_length(RZ_NONNULL const RzList *list)
Returns the length of the list.
RZ_API RZ_OWN void * rz_list_pop_head(RZ_NONNULL RzList *list)
Removes and returns the first element of the list.
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.
RZ_API char * sdb_querys(Sdb *r, char *buf, size_t len, const char *_cmd)
void * malloc(size_t size)
void * calloc(size_t number, 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")
static const char struct stat static buf struct stat static buf static vhangup int status
RZ_API void ls_free(SdbList *list)
#define ls_foreach(list, it, pos)
RZ_API void rz_analysis_op_free(void *op)
RZ_API bool rz_analysis_op_fini(RzAnalysisOp *op)
RZ_API const char * rz_analysis_optype_to_string(int type)
RZ_API int rz_analysis_optype_from_string(RZ_NONNULL const char *name)
RZ_API const char * rz_analysis_stackop_tostring(int s)
RZ_API int rz_analysis_op(RzAnalysis *analysis, RzAnalysisOp *op, ut64 addr, const ut8 *data, int len, RzAnalysisOpMask mask)
RZ_API const char * rz_analysis_op_family_to_string(int id)
static struct @218 keys[]
RZ_API bool rz_parse_filter(RzParse *p, ut64 addr, RzFlag *f, RzAnalysisHint *hint, char *data, char *str, int len, bool big_endian)
filter the opcode in data into str by following the flags and hints information
static const char hex[16]
static void pad(RzStrBuf *sb, ut32 count)
RZ_API ut64 rz_reg_getv(RzReg *reg, const char *name)
RZ_API RzRegItem * rz_reg_get(RzReg *reg, const char *name, int type)
RZ_API const char * rz_reg_get_name(RzReg *reg, int role)
RZ_API RzRegItem * rz_reg_index_get(RzReg *reg, int idx)
RZ_API ut64 rz_reg_setv(RzReg *reg, const char *name, ut64 val)
static void repeat(struct parse *, sopno, int, int)
RZ_API char * rz_analysis_rtti_demangle_class_name(RzAnalysis *analysis, const char *name)
RZ_API void rz_analysis_rtti_print_at_vtable(RzAnalysis *analysis, ut64 addr, RzOutputMode mode)
RZ_API void rz_analysis_rtti_print_all(RzAnalysis *analysis, RzOutputMode mode)
RZ_API void rz_analysis_rtti_recover_all(RzAnalysis *analysis)
RZ_API bool rz_reg_set_value_by_role(RzReg *reg, RzRegisterId role, ut64 val)
RZ_API ut64 rz_reg_get_value_by_role(RzReg *reg, RzRegisterId role)
#define RZ_ANALYSIS_ADDR_TYPE_STACK
#define RZ_ANALYSIS_ADDR_TYPE_SEQUENCE
#define RZ_ANALYSIS_ARCHINFO_DATA_ALIGN
#define RZ_ANALYSIS_ADDR_TYPE_ASCII
@ RZ_ANALYSIS_DIFF_TYPE_MATCH
@ RZ_ANALYSIS_DIFF_TYPE_UNMATCH
@ RZ_ANALYSIS_DIFF_TYPE_NULL
@ RZ_ANALYSIS_FCN_TYPE_SYM
@ RZ_ANALYSIS_FCN_TYPE_IMP
@ RZ_ANALYSIS_FCN_TYPE_ANY
@ RZ_ANALYSIS_FCN_TYPE_LOC
@ RZ_ANALYSIS_FCN_TYPE_ROOT
@ RZ_ANALYSIS_FCN_TYPE_FCN
#define RZ_ANALYSIS_ADDR_TYPE_EXEC
@ RZ_ANALYSIS_XREF_TYPE_CODE
@ RZ_ANALYSIS_XREF_TYPE_NULL
@ RZ_ANALYSIS_XREF_TYPE_STRING
@ RZ_ANALYSIS_XREF_TYPE_CALL
@ RZ_ANALYSIS_XREF_TYPE_DATA
#define RZ_ANALYSIS_ADDR_TYPE_HEAP
@ RZ_ANALYSIS_TRAP_EXEC_ERR
@ RZ_ANALYSIS_TRAP_INVALID
@ RZ_ANALYSIS_TRAP_UNALIGNED
#define RZ_ANALYSIS_ADDR_TYPE_FLAG
#define RZ_ANALYSIS_ARCHINFO_MAX_OP_SIZE
#define RZ_ANALYSIS_ADDR_TYPE_LIBRARY
#define RZ_ANALYSIS_ADDR_TYPE_REG
#define RZ_ANALYSIS_ADDR_TYPE_WRITE
@ RZ_ANALYSIS_VAR_ACCESS_TYPE_READ
@ RZ_ANALYSIS_VAR_ACCESS_TYPE_WRITE
@ RZ_ANALYSIS_OP_MASK_DISASM
@ RZ_ANALYSIS_OP_MASK_BASIC
@ RZ_ANALYSIS_OP_MASK_OPEX
@ RZ_ANALYSIS_OP_MASK_ESIL
@ RZ_ANALYSIS_OP_MASK_HINT
#define RZ_ANALYSIS_ADDR_TYPE_FUNC
#define RZ_ANALYSIS_ARCHINFO_MIN_OP_SIZE
@ RZ_ANALYSIS_VAR_KIND_REG
@ RZ_ANALYSIS_VAR_KIND_SPV
@ RZ_ANALYSIS_VAR_KIND_BPV
#define RZ_ANALYSIS_ADDR_TYPE_READ
@ RZ_ANALYSIS_OP_TYPE_JMP
@ RZ_ANALYSIS_OP_TYPE_UJMP
@ RZ_ANALYSIS_OP_TYPE_SWI
@ RZ_ANALYSIS_OP_TYPE_TRAP
@ RZ_ANALYSIS_OP_TYPE_CALL
@ RZ_ANALYSIS_OP_TYPE_CRET
@ RZ_ANALYSIS_OP_TYPE_RJMP
@ RZ_ANALYSIS_OP_TYPE_CJMP
@ RZ_ANALYSIS_OP_TYPE_COND
@ RZ_ANALYSIS_OP_TYPE_UCALL
@ RZ_ANALYSIS_OP_TYPE_RET
@ RZ_ANALYSIS_OP_TYPE_NOP
@ RZ_ANALYSIS_OP_TYPE_RCALL
#define RZ_ANALYSIS_ADDR_TYPE_PROGRAM
#define rz_warn_if_reached()
#define rz_return_if_fail(expr)
#define rz_return_val_if_fail(expr, val)
#define rz_return_val_if_reached(val)
RZ_API char * rz_base64_encode_dyn(const ut8 *bin, size_t sz)
enum rz_cmd_status_t RzCmdStatus
@ RZ_CMD_STATUS_OK
command handler exited in the right way
@ RZ_CMD_STATUS_WRONG_ARGS
command handler could not handle the arguments passed to it
@ RZ_CMD_STATUS_INVALID
command could not be executed (e.g. shell level error, bad expression, etc.)
@ RZ_CMD_STATUS_ERROR
command handler had issues while running (e.g. allocation error, etc.)
#define RZ_FLAGS_FS_IMPORTS
#define RZ_GRAPH_FORMAT_JSON
#define RZ_FLAGS_FS_REGISTERS
#define RZ_CORE_ANALYSIS_JSON_FORMAT_DISASM
#define RZ_CORE_ANALYSIS_STAR
#define RZ_GRAPH_FORMAT_CMD
#define RZ_GRAPH_FORMAT_DOT
#define RZ_GRAPH_FORMAT_GML
#define RZ_CORE_ANALYSIS_GRAPHBODY
#define RZ_FLAGS_FS_STRINGS
#define RZ_FLAGS_FS_CLASSES
#define RZ_CORE_ANALYSIS_GRAPHLINES
#define RZ_FLAGS_FS_SYMBOLS
#define RZ_GRAPH_FORMAT_GMLFCN
#define RZ_CORE_ANALYSIS_JSON
#define RZ_CORE_ANALYSIS_GRAPHDIFF
#define RZ_FLAGS_FS_FUNCTIONS
RZ_API bool rz_file_exists(const char *str)
RZ_API bool rz_file_dump(const char *file, const ut8 *buf, int len, bool append)
RZ_API char * rz_file_path(const char *bin)
bool(* RzFlagItemCb)(RzFlagItem *fi, void *user)
RZ_API void rz_graph_free(RzGraph *g)
RZ_API void rz_graph_drawable_to_json(RzGraph *graph, PJ *pj, bool use_offset)
Convert graph to JSON.
RZ_API char * rz_graph_drawable_to_dot(RzGraph *graph, const char *node_properties, const char *edge_properties)
Convert graph to Graphviz dot format.
RZ_API int rz_hex_str2bin(const char *in, ut8 *out)
Convert an input string in into the binary form in out.
RZ_API bool rz_io_read_at(RzIO *io, ut64 addr, ut8 *buf, int len)
RZ_API RzIOMap * rz_io_map_get(RzIO *io, ut64 addr)
RZ_API bool rz_io_read_at_mapped(RzIO *io, ut64 addr, ut8 *buf, int len)
RZ_API bool rz_io_is_valid_offset(RzIO *io, ut64 offset, int hasperm)
static ut64 rz_itv_end(RzInterval itv)
void(* RzListFree)(void *ptr)
int(* RzListComparator)(const void *value, const void *list_data)
#define RZ_LOG_ERROR(fmtstr,...)
RZ_API void rz_mem_reverse(ut8 *b, int l)
RZ_API const ut8 * rz_mem_mem(const ut8 *haystack, int hlen, const ut8 *needle, int nlen)
RZ_API ut64 rz_num_get(RzNum *num, const char *str)
RZ_API ut64 rz_num_math(RzNum *num, const char *str)
RZ_API size_t rz_num_base_of_string(RzNum *num, RZ_NONNULL const char *str)
Convert the base suffix to the numeric value.
RZ_API PJ * pj_j(PJ *j, const char *k)
RZ_API PJ * pj_ka(PJ *j, const char *k)
RZ_API PJ * pj_kb(PJ *j, const char *k, bool v)
RZ_API char * pj_drain(PJ *j)
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 const char * pj_string(PJ *pj)
RZ_API void pj_free(PJ *j)
RZ_API PJ * pj_s(PJ *j, const char *k)
RZ_API PJ * pj_ks(PJ *j, const char *k, const char *v)
RZ_API PJ * pj_n(PJ *j, ut64 n)
RZ_API PJ * pj_kn(PJ *j, const char *k, ut64 n)
RZ_API PJ * pj_kN(PJ *j, const char *k, st64 n)
#define RZ_PRINT_FLAGS_COLOR
#define rz_rbtree_foreach(root, it, data, struc, rb)
#define RZ_STR_ISNOTEMPTY(x)
RZ_API char * rz_str_newf(const char *fmt,...) RZ_PRINTF_CHECK(1
RZ_API char * rz_str_ndup(RZ_NULLABLE const char *ptr, int len)
Create new copy of string ptr limited to size len.
RZ_API char * rz_str_sanitize_sdb_key(const char *s)
RZ_API char * rz_str_new(const char *str)
RZ_API RZ_BORROW char * rz_str_trim_tail(RZ_NONNULL char *str)
Removes whitespace characters (space, tab, newline etc.) from the end of a string and replaces them w...
RZ_API const char * rz_str_bool(int b)
#define RZ_STR_ISEMPTY(x)
RZ_API bool rz_str_isnumber(const char *str)
RZ_API const char * rz_str_trim_head_ro(const char *str)
RZ_API int rz_str_replace_ch(char *s, char a, char b, bool g)
RZ_API char ** rz_str_argv(const char *str, int *_argc)
RZ_API void rz_str_trim(RZ_NONNULL RZ_INOUT char *str)
Removes whitespace characters (space, tab, newline etc.) from the beginning and end of a string.
RZ_API const char * rz_str_pad(const char ch, int len)
RZ_API void rz_str_argv_free(char **argv)
RZ_API size_t rz_str_split(char *str, char ch)
Split string str in place by using ch as a delimiter.
#define rz_strf(buf,...)
Convenience macro for local temporary strings.
RZ_API const char * rz_str_constpool_get(RzStrConstPool *pool, const char *str)
#define RZ_STRBUF_SAFEGET(sb)
RZ_API const char * rz_strbuf_set(RzStrBuf *sb, const char *s)
RZ_API char * rz_strbuf_get(RzStrBuf *sb)
RZ_API void rz_strbuf_fini(RzStrBuf *sb)
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 bool rz_strbuf_setbin(RzStrBuf *sb, const ut8 *s, size_t len)
RZ_API void rz_strbuf_init(RzStrBuf *sb)
RZ_API bool rz_table_align(RzTable *t, int nth, int align)
RZ_API void rz_table_add_column(RzTable *t, RzTableColumnType *type, const char *name, int maxWidth)
RZ_API void rz_table_visual_list(RzTable *table, RzList *list, ut64 seek, ut64 len, int width, bool va)
RZ_API void rz_table_add_rowf(RzTable *t, const char *fmt,...)
RZ_API void rz_table_add_row_vec(RZ_NONNULL RzTable *t, RZ_NONNULL RzPVector *items)
Add a new row to RzTable.
RZ_API void rz_table_free(RzTable *t)
RZ_API void rz_table_set_columnsf(RzTable *t, const char *fmt,...)
Specify the types and names of the referenced table.
RZ_API char * rz_table_tostring(RzTable *t)
RZ_API RzTable * rz_table_new(void)
RZ_API RzTableColumnType * rz_table_type(const char *name)
RZ_API ut64 rz_time_now_mono(void)
Returns the current time in microseconds, using the monotonic clock.
RzOutputMode
Enum to describe the way data are printed.
@ RZ_OUTPUT_MODE_STANDARD
#define RZ_BETWEEN(x, y, z)
RZ_API RzPVector * rz_pvector_new(RzPVectorFree free)
#define rz_vector_foreach(vec, it)
static void ** rz_pvector_push(RzPVector *vec, void *x)
RZ_API void rz_vector_free(RzVector *vec)
RZ_API void rz_pvector_free(RzPVector *vec)
#define rz_vector_foreach_prev(vec, it)
static size_t rz_vector_len(const RzVector *vec)
#define rz_pvector_foreach(vec, it)
RZ_API Sdb * sdb_new(const char *path, const char *name, int lock)
RZ_API void sdb_close(Sdb *s)
RZ_API bool sdb_merge(Sdb *d, Sdb *s)
RZ_API bool sdb_free(Sdb *s)
RZ_API void sdb_reset(Sdb *s)
RZ_API bool sdb_foreach(Sdb *s, SdbForeachCallback cb, void *user)
RZ_API char * sdb_itoa(ut64 n, char *s, int base)
static char * sdbkv_key(const SdbKv *kv)
RZ_API bool rz_core_seek(RzCore *core, ut64 addr, bool rb)
Seek to addr.
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
static struct sockaddr static addrlen static backlog const void msg
int(* hook_mem_read)(ANALYSIS_ESIL *esil, ut64 addr, ut8 *buf, int len)
int(* hook_reg_read)(ANALYSIS_ESIL *esil, const char *name, ut64 *res, int *size)
int(* hook_mem_write)(ANALYSIS_ESIL *esil, ut64 addr, const ut8 *buf, int len)
RzAnalysisEsilHookRegWriteCB hook_reg_write
RzAnalysisEsilInterruptHandler * handler
RzAnalysisEsilCallbacks cb
RzAnalysisEsilTrace * trace
bool(* cmd)(ANALYSIS_ESIL *esil, const char *name, ut64 a0, ut64 a1)
Generic drawable graph node.
RzAnalysisEsilLoopCB esil_post_loop
struct rz_analysis_plugin_t * cur
struct rz_analysis_esil_t * esil
RzAnalysisILVM * il_vm
user-faced VM, NEVER use this for any analysis passes!
XX curplugin == o->plugin.
Represent the output state of a command handler.
RzConsPrintablePalette pal
RzCoreGetNameDelta getNameDelta
RzCoreTaskScheduler tasks
struct rz_debug_plugin_t * cur
struct rz_io_plugin_t * plugin
struct rz_io_desc_t * desc
int arena
In which arena is this reg living. Usually equals type.
int offset
Offset into register profile in bits.
char * name[RZ_REG_NAME_LAST]
RZ_API void rz_syscall_item_free(RzSyscallItem *si)
RZ_API int rz_syscall_get_num(RzSyscall *s, const char *str)
RZ_API RzSyscallItem * rz_syscall_get(RzSyscall *s, int num, int swi)
RZ_API RzList * rz_syscall_list(RzSyscall *s)
RZ_API void rz_core_task_yield(RzCoreTaskScheduler *scheduler)
RZ_API void rz_debug_trace_op(RzDebug *dbg, RzAnalysisOp *op)
RZ_API bool rz_type_func_ret_set(RzTypeDB *typedb, const char *name, RZ_OWN RZ_NONNULL RzType *type)
Sets the new return type for the RzCallable.
RZ_API RZ_OWN RzList * rz_type_db_get_by_offset(const RzTypeDB *typedb, ut64 offset)
Returns the list of all structured types that have members matching the offset.
RZ_API void rz_type_free(RZ_NULLABLE RzType *type)
Frees the RzType.
RZ_API RzBaseType * rz_type_db_get_enum(const RzTypeDB *typedb, RZ_NONNULL const char *name)
Returns the enum base type matching the specified name.
RZ_API RZ_OWN char * rz_type_as_string(const RzTypeDB *typedb, RZ_NONNULL const RzType *type)
Returns the type C representation.
RZ_API RZ_BORROW RzAnalysisVar * rz_analysis_function_get_var(RzAnalysisFunction *fcn, char kind, int delta)
RZ_API void rz_analysis_function_delete_all_vars(RzAnalysisFunction *fcn)
RZ_API int rz_analysis_var_count(RzAnalysis *a, RzAnalysisFunction *fcn, int kind, int type)
RZ_API void rz_analysis_var_set_access(RzAnalysisVar *var, const char *reg, ut64 access_addr, int access_type, st64 stackptr)
RZ_API RzList * rz_analysis_var_list(RzAnalysis *a, RzAnalysisFunction *fcn, int kind)
RZ_API void rz_analysis_function_delete_vars_by_kind(RzAnalysisFunction *fcn, RzAnalysisVarKind kind)
RZ_API RZ_BORROW RzAnalysisVar * rz_analysis_function_set_var(RzAnalysisFunction *fcn, int delta, char kind, RZ_BORROW RZ_NULLABLE const RzType *type, int size, bool isarg, RZ_NONNULL const char *name)
RZ_DEPRECATE RZ_API RzList * rz_analysis_var_all_list(RzAnalysis *analysis, RzAnalysisFunction *fcn)
RZ_API RZ_BORROW RzAnalysisVar * rz_analysis_function_get_var_byname(RzAnalysisFunction *fcn, const char *name)
RZ_API void rz_analysis_var_set_type(RzAnalysisVar *var, RZ_OWN RzType *type, bool resolve_overlaps)
RZ_API void rz_analysis_var_global_set_type(RzAnalysisVarGlobal *glob, RZ_NONNULL RZ_BORROW RzType *type)
Set the type of the global variable.
RZ_API RZ_OWN RzAnalysisVarGlobal * rz_analysis_var_global_new(RZ_NONNULL const char *name, ut64 addr)
Create a new instance of global variable.
RZ_API RZ_BORROW RzAnalysisVarGlobal * rz_analysis_var_global_get_byname(RzAnalysis *analysis, RZ_NONNULL const char *name)
Get the instance of global variable by its name.
RZ_API void rz_analysis_var_global_free(RzAnalysisVarGlobal *glob)
Free the global variable instance.
RZ_API bool rz_analysis_var_global_delete_byname(RzAnalysis *analysis, RZ_NONNULL const char *name)
Delete and free the global variable by its name.
RZ_API bool rz_analysis_var_global_delete_byaddr_in(RzAnalysis *analysis, ut64 addr)
Same as rz_analysis_var_global_delete_byname in the address.
RZ_API RZ_OWN bool rz_analysis_var_global_add(RzAnalysis *analysis, RZ_NONNULL RzAnalysisVarGlobal *global_var)
Add the global variable into hashtable.
RZ_API bool rz_analysis_var_global_rename(RzAnalysis *analysis, RZ_NONNULL const char *old_name, RZ_NONNULL const char *newname)
Rename the global variable.
RZ_API RzListInfo * rz_listinfo_new(const char *name, RzInterval pitv, RzInterval vitv, int perm, const char *extra)
RZ_API void rz_listinfo_free(RzListInfo *info)
RZ_API void rz_analysis_list_vtables(RzAnalysis *analysis, RzOutputMode mode)
RZ_API bool rz_analysis_vtable_begin(RzAnalysis *analysis, RVTableContext *context)
ut64(WINAPI *w32_GetEnabledXStateFeatures)()
RZ_API RZ_OWN RzList * rz_analysis_xrefs_list(RzAnalysis *analysis)
Get list of all xrefs.
RZ_API RzList * rz_analysis_xrefs_get_from(RzAnalysis *analysis, ut64 addr)
RZ_API RzList * rz_analysis_xrefs_get_to(RzAnalysis *analysis, ut64 addr)
RZ_API RzList * rz_analysis_function_get_xrefs_to(RzAnalysisFunction *fcn)
RZ_API ut64 rz_analysis_xrefs_count(RzAnalysis *analysis)
RZ_API bool rz_analysis_xrefs_init(RzAnalysis *analysis)
RZ_API const char * rz_analysis_xrefs_type_tostring(RzAnalysisXRefType type)
RZ_API bool rz_analysis_xrefs_set(RzAnalysis *analysis, ut64 from, ut64 to, RzAnalysisXRefType type)
RZ_API bool rz_analysis_xref_del(RzAnalysis *analysis, ut64 from, ut64 to)
RZ_API RzList * rz_analysis_function_get_xrefs_from(RzAnalysisFunction *fcn)
static bool input(void *ud, zip_uint8_t *data, zip_uint64_t length)