Rizin
unix-like reverse engineering framework and cli tools
rz_analysis.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2009-2021 nibble <nibble.ds@gmail.com>
2 // SPDX-FileCopyrightText: 2009-2021 pancake <pancake@nopcode.org>
3 // SPDX-FileCopyrightText: 2009-2021 xvilka <anton.kochkov@gmail.com>
4 // SPDX-License-Identifier: LGPL-3.0-only
5 
6 #ifndef RZ_ANALYSIS_H
7 #define RZ_ANALYSIS_H
8 
9 /* use old refs and function storage */
10 // still required by core in lot of places
11 #define USE_VARSUBS 0
12 
13 #include <rz_types.h>
14 #include <rz_io.h>
15 #include <rz_reg.h>
16 #include <rz_list.h>
17 #include <rz_search.h>
18 #include <rz_util.h>
19 #include <rz_bind.h>
20 #include <rz_syscall.h>
21 #include <set.h>
22 #include <rz_flag.h>
23 #include <rz_bin.h>
24 #include <rz_type.h>
25 #include <rz_il.h>
26 #include <rz_platform.h>
27 #include <rz_cmd.h>
28 
29 #define esilprintf(op, fmt, ...) rz_strbuf_setf(&op->esil, fmt, ##__VA_ARGS__)
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 RZ_LIB_VERSION_HEADER(rz_analysis);
36 
37 /* dwarf processing context */
38 typedef struct rz_analysis_dwarf_context {
40  HtUP /*<offset, RzBinDwarfLocList*>*/ *loc;
41  // const RzBinDwarfCfa *cfa; TODO
43 
44 // TODO: save memory2 : fingerprints must be pointers to a buffer
45 // containing a dupped file in memory
46 
47 /* save memory:
48  bb_has_ops=1 -> 600M
49  bb_has_ops=0 -> 350MB
50  */
51 
52 typedef struct {
54  int type;
55  int rad;
57  void *user;
58  int count;
60  PJ *pj;
62 
63 typedef struct rz_analysis_range_t {
66  int bits;
70 
71 enum {
82 };
83 
84 // used from core/analysis.c
85 #define RZ_ANALYSIS_ADDR_TYPE_EXEC 1
86 #define RZ_ANALYSIS_ADDR_TYPE_READ 1 << 1
87 #define RZ_ANALYSIS_ADDR_TYPE_WRITE 1 << 2
88 #define RZ_ANALYSIS_ADDR_TYPE_FLAG 1 << 3
89 #define RZ_ANALYSIS_ADDR_TYPE_FUNC 1 << 4
90 #define RZ_ANALYSIS_ADDR_TYPE_HEAP 1 << 5
91 #define RZ_ANALYSIS_ADDR_TYPE_STACK 1 << 6
92 #define RZ_ANALYSIS_ADDR_TYPE_REG 1 << 7
93 #define RZ_ANALYSIS_ADDR_TYPE_PROGRAM 1 << 8
94 #define RZ_ANALYSIS_ADDR_TYPE_LIBRARY 1 << 9
95 #define RZ_ANALYSIS_ADDR_TYPE_ASCII 1 << 10
96 #define RZ_ANALYSIS_ADDR_TYPE_SEQUENCE 1 << 11
97 
98 #define RZ_ANALYSIS_ARCHINFO_MIN_OP_SIZE 0
99 #define RZ_ANALYSIS_ARCHINFO_MAX_OP_SIZE 1
100 #define RZ_ANALYSIS_ARCHINFO_ALIGN 2
101 #define RZ_ANALYSIS_ARCHINFO_DATA_ALIGN 4
102 
103 /* copypaste from rz_asm.h */
104 
105 #define RZ_ANALYSIS_GET_OFFSET(x, y, z) \
106  (x && x->binb.bin && x->binb.get_offset) ? x->binb.get_offset(x->binb.bin, y, z) : -1
107 
108 #define RZ_ANALYSIS_GET_NAME(x, y, z) \
109  (x && x->binb.bin && x->binb.get_name) ? x->binb.get_name(x->binb.bin, y, z) : NULL
110 
111 /* type = (RZ_ANALYSIS_VAR_TYPE_BYTE & RZ_ANALYSIS_VAR_TYPE_SIZE_MASK) |
112  * ( RANAL_VAR_TYPE_SIGNED & RANAL_VAR_TYPE_SIGN_MASK) |
113  * ( RANAL_VAR_TYPE_CONST & RANAL_VAR_TYPE_MODIFIER_MASK)
114  */
115 typedef struct rz_analysis_type_var_t {
116  char *name;
117  int index;
118  int scope;
119  ut16 type; // contain (type || signedness || modifier)
121  union {
126  } value;
128 
129 typedef struct rz_analysis_type_ptr_t {
130  char *name;
131  ut16 type; // contain (type || signedness || modifier)
133  union {
138  } value;
140 
141 typedef struct rz_analysis_type_array_t {
142  char *name;
143  ut16 type; // contain (type || signedness || modifier)
146  union {
147  ut8 *v8;
151  } value;
153 
155 typedef struct rz_analysis_type_t RzAnalysisType;
156 
158  char *name;
161  void *parent;
163 };
164 
165 typedef struct rz_analysis_type_union_t {
166  char *name;
169  void *parent;
172 
174  long address;
175  long size;
176  void *parent;
179 
180 enum {
187 };
188 
189 #define RZ_ANALYSIS_CC_MAXARG 16
190 
191 enum {
197  RZ_ANALYSIS_FCN_TYPE_INT = 1 << 4, /* privileged function - ends with iret/reti/.. */
198  RZ_ANALYSIS_FCN_TYPE_ROOT = 1 << 5, /* matching flag */
199  RZ_ANALYSIS_FCN_TYPE_ANY = -1 /* all the bits set */
200 };
201 
202 #define RZ_ANALYSIS_DIFF_THRESHOLD (0.5)
203 
204 enum {
208 };
209 
210 typedef struct rz_analysis_diff_t {
211  int type;
213  double dist;
214  char *name;
217 
218 typedef struct rz_analysis_attr_t RzAnalysisAttr;
219 
221  char *key;
222  long value;
224 };
225 
226 /* Stores useful function metadata */
227 /* TODO: Think about moving more stuff to this structure? */
228 typedef struct rz_analysis_fcn_meta_t {
229  // _min and _max are calculated lazily when queried.
230  // On changes, they will either be updated (if this can be done trivially) or invalidated.
231  // They are invalid iff _min == UT64_MAX.
232  ut64 _min; // PRIVATE, min address, use rz_analysis_function_min_addr() to access
233  ut64 _max; // PRIVATE, max address, use rz_analysis_function_max_addr() to access
234 
235  int numrefs; // number of cross references
236  int numcallrefs; // number of calls
238 
239 typedef struct rz_analysis_function_t {
240  char *name;
241  int bits; // ((> bits 0) (set-bits bits))
242  int type;
243  const char *cc; // calling convention, should come from RzAnalysis.constpool
245  HtUP /*<ut64, char *>*/ *labels;
246  HtPP /*<char *, ut64 *>*/ *label_addrs;
247  RzPVector /*<RzAnalysisVar *>*/ vars;
249  HtUP /*<st64, RzPVector<RzAnalysisVar *>>*/ *inst_vars; // offset of instructions => the variables they access
250  ut64 reg_save_area; // size of stack area pre-reserved for saving registers
251  st64 bp_off; // offset of bp inside owned stack frame
252  st64 stack; // stack frame size
253  int maxstack;
254  int ninstr;
255  bool is_pure;
257  bool has_changed; // true if function may have changed since last anaysis TODO: set this attribute where necessary
258  bool bp_frame;
259  bool is_noreturn; // true if function does not return
260  ut8 *fingerprint; // TODO: make is fuzzy and smarter
261  int argnum; // number of arguments;
264  RzList /*<RzAnalysisBlock *>*/ *bbs; // TODO: should be RzPVector
266  RzList /*<char *>*/ *imports; // maybe bound to class?
267  struct rz_analysis_t *analysis; // this function is associated with this instance
269 
270 typedef struct rz_analysis_func_arg_t {
271  const char *name;
272  const char *fmt;
273  const char *cc_source;
277  ut64 src; // Function-call argument value or pointer to it
279 
281  char *name;
285 };
286 
287 typedef enum {
289  RZ_META_TYPE_DATA = 'd', //< marks the data as data (not a code)
290  RZ_META_TYPE_CODE = 'c', //< marks the data as code
291  RZ_META_TYPE_STRING = 's', //< marks the data as string
292  RZ_META_TYPE_FORMAT = 'f', //< sets the specified format (pf) to the data
293  RZ_META_TYPE_MAGIC = 'm', //< sets the magic string to the data
294  RZ_META_TYPE_HIDE = 'h', //< set the data as hidden
295  RZ_META_TYPE_COMMENT = 'C', //< attaches the comment to the data
296  RZ_META_TYPE_HIGHLIGHT = 'H', //< sets the specified highlight to the data
297  RZ_META_TYPE_VARTYPE = 't', //< sets the specified type to the variable/address
299 
300 /* meta */
301 typedef struct rz_analysis_meta_item_t {
303  int subtype;
304  char *str;
305  size_t size;
306  const RzSpace *space;
308 
309 // anal
310 typedef enum {
312  RZ_ANALYSIS_OP_FAMILY_CPU = 0, /* normal cpu instruction */
313  RZ_ANALYSIS_OP_FAMILY_FPU, /* fpu (floating point) */
314  RZ_ANALYSIS_OP_FAMILY_MMX, /* multimedia instruction (packed data) */
315  RZ_ANALYSIS_OP_FAMILY_SSE, /* extended multimedia instruction (packed data) */
316  RZ_ANALYSIS_OP_FAMILY_PRIV, /* privileged instruction */
317  RZ_ANALYSIS_OP_FAMILY_CRYPTO, /* cryptographic instructions */
318  RZ_ANALYSIS_OP_FAMILY_THREAD, /* thread/lock/sync instructions */
319  RZ_ANALYSIS_OP_FAMILY_VIRT, /* virtualization instructions */
320  RZ_ANALYSIS_OP_FAMILY_SECURITY, /* security instructions */
321  RZ_ANALYSIS_OP_FAMILY_IO, /* IO instructions (i.e. IN/OUT) */
324 
325 #if 0
326 On x86 according to Wikipedia
327 
328  Prefix group 1
329  0xF0: LOCK prefix
330  0xF2: REPNE/REPNZ prefix
331  0xF3: REP or REPE/REPZ prefix
332  Prefix group 2
333  0x2E: CS segment override
334  0x36: SS segment override
335  0x3E: DS segment override
336  0x26: ES segment override
337  0x64: FS segment override
338  0x65: GS segment override
339  0x2E: Branch not taken (hinting)
340  0x3E: Branch taken
341  Prefix group 3
342  0x66: Operand-size override prefix
343  Prefix group 4
344  0x67: Address-size override prefix
345 #endif
346 typedef enum {
353  RZ_ANALYSIS_OP_PREFIX_HWLOOP_END = 1 << 6, /* Hexagon specific. Last instruction in a hardware loop */
354  /* TODO: add segment override typemods? */
356 
357 // XXX: this definition is plain wrong. use enum or empower bits
358 #define RZ_ANALYSIS_OP_TYPE_MASK 0x8000ffff
359 #define RZ_ANALYSIS_OP_HINT_MASK 0xf0000000
360 typedef enum {
361  RZ_ANALYSIS_OP_TYPE_COND = 0x80000000, // TODO must be moved to prefix?
362  // TODO: MOVE TO PREFIX .. it is used by analysis_java.. must be updated
363  RZ_ANALYSIS_OP_TYPE_REP = 0x40000000, /* repeats next instruction N times */
364  RZ_ANALYSIS_OP_TYPE_MEM = 0x20000000, // TODO must be moved to prefix?
365  RZ_ANALYSIS_OP_TYPE_REG = 0x10000000, // operand is a register
366  RZ_ANALYSIS_OP_TYPE_IND = 0x08000000, // operand is indirect
368  RZ_ANALYSIS_OP_TYPE_JMP = 1, /* mandatory jump */
369  RZ_ANALYSIS_OP_TYPE_UJMP = 2, /* unknown jump (register or so) */
378  RZ_ANALYSIS_OP_TYPE_CALL = 3, /* call to subroutine (branch+link) */
379  RZ_ANALYSIS_OP_TYPE_UCALL = 4, /* unknown call (register or so) */
385  RZ_ANALYSIS_OP_TYPE_RET = 5, /* returns from subroutine */
386  RZ_ANALYSIS_OP_TYPE_CRET = RZ_ANALYSIS_OP_TYPE_COND | RZ_ANALYSIS_OP_TYPE_RET, /* conditional return from subroutine */
387  RZ_ANALYSIS_OP_TYPE_ILL = 6, /* illegal instruction // trap */
388  RZ_ANALYSIS_OP_TYPE_UNK = 7, /* unknown opcode type */
389  RZ_ANALYSIS_OP_TYPE_NOP = 8, /* does nothing */
390  RZ_ANALYSIS_OP_TYPE_MOV = 9, /* register move */
392  RZ_ANALYSIS_OP_TYPE_TRAP = 10, /* it's a trap! */
393  RZ_ANALYSIS_OP_TYPE_SWI = 11, /* syscall, software interrupt */
394  RZ_ANALYSIS_OP_TYPE_CSWI = 11 | RZ_ANALYSIS_OP_TYPE_COND, /* syscall, software interrupt */
395  RZ_ANALYSIS_OP_TYPE_UPUSH = 12, /* unknown push of data into stack */
397  RZ_ANALYSIS_OP_TYPE_PUSH = 13, /* push value into stack */
398  RZ_ANALYSIS_OP_TYPE_POP = 14, /* pop value from stack to register */
399  RZ_ANALYSIS_OP_TYPE_CMP = 15, /* compare something */
400  RZ_ANALYSIS_OP_TYPE_ACMP = 16, /* compare via and */
415  RZ_ANALYSIS_OP_TYPE_STORE = 31, /* store from register to memory */
416  RZ_ANALYSIS_OP_TYPE_LOAD = 32, /* load from memory to register */
417  RZ_ANALYSIS_OP_TYPE_LEA = 33, /* TODO add ulea */
429  RZ_ANALYSIS_OP_TYPE_CPL = 45, /* complement */
432 // RZ_ANALYSIS_OP_TYPE_DEBUG = 43, // monitor/trace/breakpoint
433 #if 0
434  RZ_ANALYSIS_OP_TYPE_PRIV = 40, /* privileged instruction */
435  RZ_ANALYSIS_OP_TYPE_FPU = 41, /* floating point stuff */
436 #endif
438 
439 typedef enum {
440  RZ_ANALYSIS_OP_MASK_BASIC = 0, // Just fills basic op info , it's fast
441  RZ_ANALYSIS_OP_MASK_ESIL = (1 << 0), // It fills RzAnalysisop->esil info
442  RZ_ANALYSIS_OP_MASK_VAL = (1 << 1), // It fills RzAnalysisop->dst/src info
443  RZ_ANALYSIS_OP_MASK_HINT = (1 << 2), // It calls rz_analysis_op_hint to override analysis options
444  RZ_ANALYSIS_OP_MASK_OPEX = (1 << 3), // It fills RzAnalysisop->opex info
445  RZ_ANALYSIS_OP_MASK_DISASM = (1 << 4), // It fills RzAnalysisop->mnemonic // should be RzAnalysisOp->disasm // only from rz_core_analysis_op()
446  RZ_ANALYSIS_OP_MASK_IL = (1 << 5), // It fills RzAnalysisop->il_op
449 
450 typedef enum {
453 
454 typedef enum {
463 
464 enum {
466  RZ_ANALYSIS_REFLINE_TYPE_WIDE = 2, /* reflines have a space between them */
467  RZ_ANALYSIS_REFLINE_TYPE_MIDDLE_BEFORE = 4, /* do not consider starts/ends of
468  * reflines (used for comment lines before disasm) */
469  RZ_ANALYSIS_REFLINE_TYPE_MIDDLE_AFTER = 8 /* as above but for lines after disasm */
470 };
471 
472 typedef enum {
474  RZ_ANALYSIS_RET_ERROR = -1, // Basic block ended because of analysis error.
475  RZ_ANALYSIS_RET_END = -4, // Basic block ended because of return instruction.
476  RZ_ANALYSIS_RET_BRANCH = -5, // Basic block ended because of branch instruction.
477  RZ_ANALYSIS_RET_COND = -6, // Basic block ended because of conditional return.
479 
480 typedef struct rz_analysis_case_obj_t {
485 
486 typedef struct rz_analysis_switch_obj_t {
491  RzList /*<RzAnalysisCaseOp>*/ *cases;
494 
495 struct rz_analysis_t;
496 struct rz_analysis_bb_t;
497 typedef struct rz_analysis_callbacks_t {
498  int (*on_fcn_new)(struct rz_analysis_t *, void *user, RzAnalysisFunction *fcn);
499  int (*on_fcn_delete)(struct rz_analysis_t *, void *user, RzAnalysisFunction *fcn);
500  int (*on_fcn_rename)(struct rz_analysis_t *, void *user, RzAnalysisFunction *fcn, const char *oldname);
501  int (*on_fcn_bb_new)(struct rz_analysis_t *, void *user, RzAnalysisFunction *fcn, struct rz_analysis_bb_t *bb);
503 
504 #define RZ_ANALYSIS_ESIL_GOTO_LIMIT 4096
505 
506 typedef struct rz_analysis_options_t {
507  int depth;
509  bool vars; // analysisyze local var and arguments
510  bool varname_stack; // name vars based on their offset in the stack
511  int cjmpref;
512  int jmpref;
513  int jmpabove;
514  bool ijmp;
515  bool jmpmid; // continue analysis after jmp into middle of insn
516  bool loads;
522  bool trycatch;
523  bool norevisit;
524  int afterjmp; // continue analysis after jmp eax or forward jmp // option
525  int aftertrap; // continue analysis after trap instructions
526  int recont; // continue on recurse analysis mode
527  int noncode;
528  int nopskip; // skip nops at the beginning of functions
529  int hpskip; // skip `mov reg,reg` and `lea reg,[reg]`
530  int jmptbl; // analyze jump tables
531  int jmptbl_maxcount; // maximum amount of entries to analyse in a jump table
532  ut32 jmptbl_maxoffset; // maximum offset from the jump table jump instruction to consider it valid
533  int nonull;
534  bool pushret; // analyze push+ret as jmp
535  bool armthumb; //
536  bool delay;
537  int tailcall;
538  bool retpoline;
540 
541 typedef enum {
545 
546 typedef struct rz_analysis_hint_cb_t {
547  // add more cbs as needed
548  void (*on_bits)(struct rz_analysis_t *a, ut64 addr, int bits, bool set);
550 
551 typedef struct rz_analysis_il_vm_t RzAnalysisILVM;
552 
553 typedef struct rz_analysis_t {
554  char *cpu; // analysis.cpu
555  char *os; // asm.os
556  int bits; // asm.bits
557  int lineswidth; // asm.lines.width
558  int big_endian; // cfg.bigendian
559  int sleep; // analysis.sleep, sleep some usecs before analyzing more (avoid 100% cpu usages)
560  RzAnalysisCPPABI cpp_abi; // analysis.cpp.abi
561  void *plugin_data;
562  void *core;
563  ut64 gp; // analysis.gp, global pointer. used for mips. but can be used by other arches too in the future
564  RBTree bb_tree; // all basic blocks by address. They can overlap each other, but must never start at the same address.
565  RzList /*<RzAnalysisFunction *>*/ *fcns;
566  HtUP *ht_addr_fun; // address => function
567  HtPP *ht_name_fun; // name => function
571  int diff_ops;
572  double diff_thbb;
573  double diff_thfcn;
579  RzBinBind binb; // Set only from core when an analysis plugin is called.
581  int maxreflines; // asm.lines.maxref
582  int esil_goto_limit; // esil.gotolimit
583  int pcalign; // asm.pcalign
587  RzAnalysisRange *limit; // analysis.from, analysis.to
588  RzList /*<RzAnalysisPlugin *>*/ *plugins;
592  HtUP *ht_xrefs_to;
593  bool recursive_noreturn; // analysis.rnr
594  // moved from RzAnalysisFcn
595  Sdb *sdb; // root
596  HtUP /*<RzVector<RzAnalysisAddrHintRecord>>*/ *addr_hints; // all hints that correspond to a single address
597  RBTree /*<RzAnalysisArchHintRecord>*/ arch_hints;
598  RBTree /*<RzAnalysisArchBitsRecord>*/ bits_hints;
602  RzTypeDB *typedb; // Types management
603  HtUP *type_links; // Type links to the memory address or register
604  Sdb *sdb_cc; // calling conventions
609  RzList /*<RzAnalysisRefline *>*/ *reflines;
610  // RzList *noreturn;
612  int stackptr;
613  bool (*log)(struct rz_analysis_t *analysis, const char *msg);
614  bool (*read_at)(struct rz_analysis_t *analysis, ut64 addr, ut8 *buf, int len);
615  int seggrn;
618  RzList /*<char *>*/ *imports; // global imports
621  RzList /*<leaddr_pair *>*/ *leaddrs;
624  HtPP *ht_global_var; // global variables
625  RBTree global_var_tree; // global variables by address. must not overlap
628 
647 
650  union {
651  char *type_offset;
652  int nword;
655  int newbits;
656  int immbase;
659  char *syntax;
660  char *opcode;
661  char *esil;
662  int optype;
666  };
668 
669 typedef struct rz_analysis_hint_t {
672  ut64 val; // used to hint jmp rax
675  ut64 ret; // hint for function ret values
676  char *arch;
677  char *opcode;
678  char *syntax;
679  char *esil;
680  char *offset;
683  int bits;
684  int new_bits; // change asm.bits after evaluating this instruction
685  int immbase;
686  bool high; // highlight hint
687  int nword;
690 
691 typedef RzAnalysisFunction *(*RzAnalysisGetFcnIn)(RzAnalysis *analysis, ut64 addr, int type);
692 typedef RzAnalysisHint *(*RzAnalysisGetHint)(RzAnalysis *analysis, ut64 addr);
693 
694 typedef struct rz_analysis_bind_t {
699 
700 typedef const char *(*RzAnalysisLabelAt)(RzAnalysisFunction *fcn, ut64);
701 
702 typedef enum {
707 
708 #define VARPREFIX "var"
709 #define ARGPREFIX "arg"
710 
711 typedef enum {
716 
717 typedef struct rz_analysis_var_access_t {
718  const char *reg; // register used for access
719  st64 offset; // relative to the function's entrypoint
720  st64 stackptr; // delta added to register to get the var, e.g. [rbp - 0x10]
721  ut8 type; // RzAnalysisVarAccessType bits
723 
724 // generic for args and locals
725 typedef struct rz_analysis_var_t {
727  char *name; // name of the variable
729  bool isarg;
730  int delta; /* delta offset inside stack frame */
731  char *regname; // name of the register
732  RzVector /*<RzAnalysisVarAccess>*/ accesses; // ordered by offset, touch this only through API or expect uaf
733  char *comment;
734  RzVector /*<RzTypeConstraint>*/ constraints;
735  RzType *type; // var type
736 
737  // below members are just for caching, TODO: remove them and do it better
738  int argnum;
740 
744 typedef struct rz_analysis_var_global_t {
746  char *name;
749  RzVector /*<RzTypeConstraint>*/ constraints;
752 
753 // Refers to a variable or a struct field inside a variable, only for varsub
755  char *name;
757  bool field;
759 
760 typedef enum {
762  RZ_ANALYSIS_ACC_R = (1 << 0),
763  RZ_ANALYSIS_ACC_W = (1 << 1),
765 
766 typedef enum {
772 
773 // base+reg+regdelta*mul+delta
774 typedef struct rz_analysis_value_t {
777  int absolute; // if true, unsigned cast is used
778  int memref; // is memory reference? which size? 1, 2 ,4, 8
779  ut64 base; // numeric address
780  st64 delta; // numeric delta
781  st64 imm; // immediate value
782  int mul; // multiplier (reg*4+base)
783  RzRegItem *seg; // segment selector register
784  RzRegItem *reg; // register / register base used (-1 if no reg)
785  RzRegItem *regdelta; // register index used (-1 if no reg)
786  ut64 plugin_specific; // Can be used differently by each analysis plugin.
788 
789 typedef enum {
795 
808 
810 
811 typedef struct rz_analysis_op_t {
812  char *mnemonic; /* mnemonic.. it actually contains the args too, we should replace rasm with this */
813  ut64 addr; /* address */
814  ut32 type; /* type of opcode */
815  RzAnalysisOpPrefix prefix; /* type of opcode prefix (rep,lock,..) */
816  ut32 type2; /* used by java */
817  RzAnalysisStackOp stackop; /* operation on stack? */
818  RzTypeCond cond; /* condition type */
819  int size; /* size in bytes of opcode */
820  int nopcode; /* number of bytes representing the opcode (not the arguments) TODO: find better name */
821  int cycles; /* cpu-cycles taken by instruction */
822  int failcycles; /* conditional cpu-cycles */
823  RzAnalysisOpFamily family; /* family of opcode */
824  int id; /* instruction id */
825  bool eob; /* end of block (boolean) */
826  bool sign; /* operates on signed values, false by default */
827  /* Run N instructions before executing the current one */
828  int delay; /* delay N slots (mips, ..)*/
829  ut64 jump; /* true jmp */
830  ut64 fail; /* false jmp */
832  st64 ptr; /* reference to memory */ /* XXX signed? */
833  ut64 val; /* reference to value */ /* XXX signed? */
834  RzAnalysisValue analysis_vals[6]; /* Analyzable values */
835  int ptrsize; /* f.ex: zero extends for 8, 16 or 32 bits only */
836  st64 stackptr; /* stack pointer */
837  int refptr; /* if (0) ptr = "reference" else ptr = "load memory of refptr bytes" */
838  ut64 mmio_address; // mmio address
841  RzList *access; /* RzAnalysisValue access information */
845  const char *reg; /* destination register */
846  const char *ireg; /* register used for indirect memory computation*/
847  int scale;
853 
854 #define RZ_TYPE_COND_SINGLE(x) (!x->arg[1] || x->arg[0] == x->arg[1])
855 
856 typedef struct rz_analysis_cond_t {
857  RzTypeCond type; // filled by CJMP opcode
858  RzAnalysisValue *arg[2]; // filled by CMP opcode
860 
861 typedef struct rz_analysis_bb_t {
862  RBNode _rb; // private, node in the RBTree
863  ut64 _max_end; // private, augmented value for RBTree
864 
869  bool traced;
875  ut16 *op_pos; // offsets of instructions in this block, count is ninstr - 1 (first is always 0)
878  int op_pos_size; // size of the op_pos array
879  int ninstr;
880  int stackptr;
883  const char *cmpreg;
884  ut32 bbhash; // calculated with xxhash
885 
886  RzList /*<RzAnalysisFunction *>*/ *fcns;
888  int ref;
890 
891 typedef struct rz_analysis_task_item {
892  RzAnalysisFunction *fcn; // current function
893  RzAnalysisBlock *block; // block being analyzed
894  st64 stack; // stack pointer value for variable analysis
895  ut64 start_address; // if block = NULL, creates block at address, else continues analysis from here
897 
898 typedef enum {
900  RZ_ANALYSIS_XREF_TYPE_CODE = 'c', // code ref
901  RZ_ANALYSIS_XREF_TYPE_CALL = 'C', // code ref (call)
902  RZ_ANALYSIS_XREF_TYPE_DATA = 'd', // mem ref
903  RZ_ANALYSIS_XREF_TYPE_STRING = 's' // string ref
905 
906 typedef struct rz_analysis_ref_t {
912 
913 /* represents a reference line from one address (from) to another (to) */
914 typedef struct rz_analysis_refline_t {
917  int index;
918  int level;
919  int type;
922 
924  ut64 naddr; // next addr
928 
929 typedef struct rz_analysis_cycle_hook_t { // rename ?
931  int cycles;
933 
934 typedef struct rz_analysis_esil_word_t {
935  int type;
936  const char *str;
938 
939 // only flags that affect control flow
940 enum {
946  // ...
947 };
948 
949 enum {
961 };
962 
963 enum {
967 };
968 
969 typedef struct rz_analysis_ref_char {
970  char *str;
971  char *cols;
973 
974 // must be a char
975 #define ESIL_INTERNAL_PREFIX '$'
976 #define ESIL_STACK_NAME "esil.ram"
977 #define ANALYSIS_ESIL struct rz_analysis_esil_t
978 
982  void *content;
984 
991 
992 typedef bool (*RzAnalysisEsilInterruptCB)(ANALYSIS_ESIL *esil, ut32 interrupt, void *user);
993 
995  const ut32 num;
996  const char *name;
997  void *(*init)(ANALYSIS_ESIL *esil);
999  void (*fini)(void *user);
1001 
1003  int idx;
1006 
1008  int idx;
1011 
1013  int idx;
1014  int end_idx;
1015  HtUP *registers;
1016  HtUP *memory;
1021  // RzVector<RzILTraceInstruction>
1024 
1025 typedef int (*RzAnalysisEsilHookRegWriteCB)(ANALYSIS_ESIL *esil, const char *name, ut64 *val);
1026 
1028  void *user;
1029  /* callbacks */
1030  int (*hook_flag_read)(ANALYSIS_ESIL *esil, const char *flag, ut64 *num);
1031  int (*hook_command)(ANALYSIS_ESIL *esil, const char *op);
1034  int (*hook_mem_write)(ANALYSIS_ESIL *esil, ut64 addr, const ut8 *buf, int len);
1035  int (*mem_write)(ANALYSIS_ESIL *esil, ut64 addr, const ut8 *buf, int len);
1036  int (*hook_reg_read)(ANALYSIS_ESIL *esil, const char *name, ut64 *res, int *size);
1037  int (*reg_read)(ANALYSIS_ESIL *esil, const char *name, ut64 *res, int *size);
1039  int (*reg_write)(ANALYSIS_ESIL *esil, const char *name, ut64 val);
1041 
1042 typedef struct rz_analysis_esil_t {
1044  char **stack;
1049  int nowrite;
1050  int iotrap;
1052  int repeat;
1056  int verbose;
1061  int delay; // mapped to $ds in ESIL
1062  ut64 jump_target; // mapped to $jt in ESIL
1063  int jump_target_set; // mapped to $js in ESIL
1064  int trap;
1065  ut32 trap_code; // extend into a struct to store more exception info?
1066  // parity flag? done with cur
1067  ut64 old; // used for carry-flagging and borrow-flagging
1068  ut64 cur; // used for carry-flagging and borrow-flagging
1069  ut8 lastsz; // in bits //used for signature-flag
1070  /* native ops and custom ops */
1071  HtPP *ops;
1074  HtUP *interrupts;
1075  /* deep esil parsing fills this */
1079  // this is so cursed, can we please remove external commands from esil internals.
1080  // Function pointers are fine, but not commands
1081  char *cmd_step; // rizin (external) command to run before a step is performed
1082  char *cmd_step_out; // rizin (external) command to run after a step is performed
1083  char *cmd_intr; // rizin (external) command to run when an interrupt occurs
1084  char *cmd_trap; // rizin (external) command to run when a trap occurs
1085  char *cmd_mdev; // rizin (external) command to run when an memory mapped device address is used
1086  char *cmd_todo; // rizin (external) command to run when esil expr contains TODO
1087  char *cmd_ioer; // rizin (external) command to run when esil fails to IO
1088  char *mdev_range; // string containing the rz_str_range to match for read/write accesses
1089  bool (*cmd)(ANALYSIS_ESIL *esil, const char *name, ut64 a0, ut64 a1);
1090  void *user;
1091  int stack_fd; // ahem, let's not do this
1093 
1094 /* Alias RegChange and MemChange */
1097 
1098 /* Alias esil strace */
1100 
1105  RZ_NONNULL const char *name;
1108 
1118  RzVector /* <RzAnalysisILInitStateVar> */ vars;
1120 
1134 typedef struct rz_analysis_il_config_t {
1143  RzPVector /*<RzILEffectLabel *>*/ labels;
1145  // more information might go in here, for example additional memories, etc.
1147 
1159 } /* RzAnalysisILVM */;
1160 
1161 typedef enum {
1167 
1168 #undef ESIL
1169 
1172  void *user;
1176 
1177 enum {
1185 };
1186 
1188 
1191  ut32 push; // amount of operands pushed
1192  ut32 pop; // amount of operands popped
1195 
1196 // this is 80-bit offsets so we can address every piece of esil in an instruction
1201 
1202 typedef enum {
1208 
1212  char *expr; // synthesized esil-expression for this block
1213  RzAnalysisEsilBlockEnterType enter; // maybe more type is needed here
1215 
1216 // TODO: rm data + len
1218 
1220 typedef char *(*RzAnalysisRegProfGetCallback)(RzAnalysis *a);
1224 typedef int (*RzAnalysisDiffFcnCallback)(RzAnalysis *analysis, RzList /*<RzAnalysisFunction *>*/ *fcns, RzList /*<RzAnalysisFunction *>*/ *fcns2);
1226 
1229 typedef int (*RzAnalysisEsilTrapCB)(RzAnalysisEsil *esil, int trap_type, int trap_code);
1230 
1231 typedef RzAnalysisILConfig *(*RzAnalysisILConfigCB)(RzAnalysis *analysis);
1232 
1233 typedef struct rz_analysis_plugin_t {
1234  const char *name;
1235  const char *desc;
1236  const char *license;
1237  const char *arch;
1238  const char *author;
1239  const char *version;
1240  int bits;
1241  int esil; // can do esil or not
1243  bool (*init)(void **user);
1244  bool (*fini)(void *user);
1245  // int (*reset_counter) (RzAnalysis *analysis, ut64 start_addr);
1246  int (*archinfo)(RzAnalysis *analysis, int query);
1247  ut8 *(*analysis_mask)(RzAnalysis *analysis, int size, const ut8 *data, ut64 at);
1248  RzList /*<RzSearchKeyword *>*/ *(*preludes)(RzAnalysis *analysis);
1249 
1254  int (*address_bits)(RzAnalysis *analysis, int bits);
1255 
1256  // legacy rz_analysis_functions
1258 
1265 
1266  RzAnalysisEsilCB esil_init; // initialize esil-related stuff
1267  RzAnalysisEsilLoopCB esil_post_loop; // cycle-counting, firing interrupts, ...
1268  RzAnalysisEsilTrapCB esil_trap; // traps / exceptions
1269  RzAnalysisEsilCB esil_fini; // deinitialize
1271 
1273 
1274 /*----------------------------------------------------------------------------------------------*/
1275 
1276 #ifdef RZ_API
1277 /* --------- */ /* REFACTOR */ /* ---------- */
1278 /* type.c */
1280 RZ_API bool rz_analysis_op_nonlinear(int t);
1281 RZ_API bool rz_analysis_op_ismemref(int t);
1282 RZ_API const char *rz_analysis_optype_to_string(int t);
1284 RZ_API const char *rz_analysis_op_family_to_string(int n);
1287 
1288 /* block.c */
1289 typedef bool (*RzAnalysisBlockCb)(RzAnalysisBlock *block, void *user);
1290 typedef bool (*RzAnalysisAddrCb)(ut64 addr, void *user);
1291 
1292 // lifetime
1295 
1296 // Create one block covering the given range.
1297 // This will fail if the range overlaps any existing blocks.
1299 
1300 static inline bool rz_analysis_block_contains(RzAnalysisBlock *bb, ut64 addr) {
1301  return addr >= bb->addr && addr < bb->addr + bb->size;
1302 }
1303 
1304 // Split the block at the given address into two blocks.
1305 // bb will stay the first block, the second block will be returned (or NULL on failure)
1306 // The returned block will always be refd, i.e. it is necessary to always call rz_analysis_block_unref() on the return value!
1308 
1309 static inline bool rz_analysis_block_is_contiguous(RzAnalysisBlock *a, RzAnalysisBlock *b) {
1310  return (a->addr + a->size) == b->addr;
1311 }
1312 
1313 // Merge block b into a.
1314 // b will be FREED (not just unrefd) and is NOT VALID anymore if this function is successful!
1315 // This only works if b follows directly after a and their function lists are identical.
1316 // returns true iff the blocks could be merged
1318 
1319 // Manually delete a block and remove it from all its functions
1320 // If there are more references to it than from its functions only, it will not be removed immediately!
1322 
1324 
1325 // Set the address and size of the block.
1326 // This can fail (and return false) if there is already another block at the new address
1328 
1330 RZ_API bool rz_analysis_blocks_foreach_in(RzAnalysis *analysis, ut64 addr, RzAnalysisBlockCb cb, void *user);
1331 RZ_API RzList /*<RzAnalysisBlock *>*/ *rz_analysis_get_blocks_in(RzAnalysis *analysis, ut64 addr); // values from rz_analysis_blocks_foreach_in as a list
1332 RZ_API void rz_analysis_blocks_foreach_intersect(RzAnalysis *analysis, ut64 addr, ut64 size, RzAnalysisBlockCb cb, void *user);
1333 RZ_API RzList /*<RzAnalysisBlock *>*/ *rz_analysis_get_blocks_intersect(RzAnalysis *analysis, ut64 addr, ut64 size); // values from rz_analysis_blocks_foreach_intersect as a list
1334 
1335 // Call cb on every direct successor address of block
1336 // returns false if the loop was breaked by cb
1337 RZ_API bool rz_analysis_block_successor_addrs_foreach(RzAnalysisBlock *block, RzAnalysisAddrCb cb, void *user);
1338 
1339 // Call cb on block and every (recursive) successor of it
1340 // returns false if the loop was breaked by cb
1341 RZ_API bool rz_analysis_block_recurse(RzAnalysisBlock *block, RzAnalysisBlockCb cb, void *user);
1342 
1343 // Call cb on block and every (recursive) successor of it
1344 // If cb returns false, recursion stops only for that block
1345 // returns false if the loop was breaked by cb
1346 RZ_API bool rz_analysis_block_recurse_followthrough(RzAnalysisBlock *block, RzAnalysisBlockCb cb, void *user);
1347 
1348 // Call cb on block and every (recursive) successor of it
1349 // Call on_exit on block that doesn't have non-visited successors
1350 // returns false if the loop was breaked by cb
1351 RZ_API bool rz_analysis_block_recurse_depth_first(RzAnalysisBlock *block, RzAnalysisBlockCb cb, RZ_NULLABLE RzAnalysisBlockCb on_exit, void *user);
1352 
1353 // same as rz_analysis_block_recurse, but returns the blocks as a list
1354 RZ_API RzList /*<RzAnalysisBlock *>*/ *rz_analysis_block_recurse_list(RzAnalysisBlock *block);
1355 
1356 // return one shortest path from block to dst or NULL if none exists.
1358 
1359 // Add a case to the block's switch_op.
1360 // If block->switch_op is NULL, it will be created with the given switch_addr.
1361 RZ_API void rz_analysis_block_add_switch_case(RzAnalysisBlock *block, ut64 switch_addr, ut64 case_value, ut64 case_addr);
1362 
1363 // Chop off the block at the specified address and remove all destinations.
1364 // Blocks that have become unreachable after this operation will be automatically removed from all functions of block.
1365 // addr must be the address directly AFTER the noreturn call!
1366 // After the chopping, an rz_analysis_block_automerge() is performed on the touched blocks.
1367 // IMPORTANT: The automerge might also FREE block! This function returns block iff it is still valid afterwards.
1368 // If this function returns NULL, the pointer to block MUST not be touched anymore!
1370 
1371 // Merge every block in blocks with their contiguous predecessor, if possible.
1372 // IMPORTANT: Merged blocks will be FREED! The blocks list will be updated to contain only the survived blocks.
1373 RZ_API void rz_analysis_block_automerge(RzList /*<RzAnalysisBlock *>*/ *blocks);
1374 
1375 // return true iff an instruction in the given basic block starts at the given address
1377 
1378 // Updates bbhash based on current bytes inside the block
1380 
1381 // returns true if a byte in the given basic block was modified
1383 
1385 
1392 
1393 // ---------------------------------------
1394 
1395 /* function.c */
1396 
1398 RZ_API void rz_analysis_function_free(void *fcn);
1399 
1400 // Add a function created with rz_analysis_function_new() to anal
1402 
1403 // Create a new function and add it to analysis (rz_analysis_function_new() + set members + rz_analysis_add_function())
1405 
1406 // returns all functions that have a basic block containing the given address
1407 RZ_API RzList /*<RzAnalysisFunction *>*/ *rz_analysis_get_functions_in(RzAnalysis *analysis, ut64 addr);
1408 
1409 // returns the function that has its entrypoint at addr or NULL
1411 
1413 
1414 // returns the list of functions in the RzAnalysis instance
1415 RZ_API RZ_BORROW RzList /*<RzAnalysisFunction *>*/ *rz_analysis_function_list(RzAnalysis *analysis);
1416 
1417 // rhange the entrypoint of fcn
1418 // This can fail (and return false) if there is already another function at the new address
1420 
1421 // rename the given function
1422 // This can fail (and return false) if there is another function with the name given
1424 
1427 
1428 // size of the entire range that the function spans, including holes.
1429 // this is exactly rz_analysis_function_max_addr() - rz_analysis_function_min_addr()
1431 
1432 // lowest address covered by the function
1434 
1435 // first address directly after the function
1437 
1438 // size from the function entrypoint (fcn->addr) to the end of the function (rz_analysis_function_max_addr)
1440 
1441 // the "real" size of the function, that is the sum of the size of the
1442 // basicblocks this function is composed of
1444 
1445 // returns whether the function contains a basic block that contains addr
1446 // This is completely independent of fcn->addr, which is only the entrypoint!
1448 
1449 // returns true if function bytes were modified
1451 
1454 
1455 /* analysis.c */
1457 RZ_API void rz_analysis_purge(RzAnalysis *analysis);
1460 RZ_API int rz_analysis_archinfo(RzAnalysis *analysis, int query);
1461 RZ_API bool rz_analysis_use(RzAnalysis *analysis, const char *name);
1464 RZ_API bool rz_analysis_set_bits(RzAnalysis *analysis, int bits);
1465 RZ_API bool rz_analysis_set_os(RzAnalysis *analysis, const char *os);
1466 RZ_API void rz_analysis_set_cpu(RzAnalysis *analysis, const char *cpu);
1467 RZ_API int rz_analysis_set_big_endian(RzAnalysis *analysis, int boolean);
1468 RZ_API ut8 *rz_analysis_mask(RzAnalysis *analysis, ut32 size, const ut8 *data, ut64 at);
1470 RZ_API const char *rz_analysis_fcntype_tostring(int type);
1472 RZ_API bool rz_analysis_set_triplet(RzAnalysis *analysis, const char *os, const char *arch, int bits);
1473 RZ_API void rz_analysis_add_import(RzAnalysis *analysis, const char *imp);
1474 RZ_API void rz_analysis_remove_import(RzAnalysis *analysis, const char *imp);
1477 
1478 /* op.c */
1479 RZ_API const char *rz_analysis_stackop_tostring(int s);
1481 RZ_API void rz_analysis_op_free(void *op);
1484 RZ_API int rz_analysis_op_reg_delta(RzAnalysis *analysis, ut64 addr, const char *name);
1486 RZ_API RzList /*<RzAnalysisOp *>*/ *rz_analysis_op_list_new(void);
1487 RZ_API int rz_analysis_op(RzAnalysis *analysis, RzAnalysisOp *op, ut64 addr, const ut8 *data, int len, RzAnalysisOpMask mask);
1488 RZ_API RzAnalysisOp *rz_analysis_op_hexstr(RzAnalysis *analysis, ut64 addr, const char *hexstr);
1490 
1491 RZ_API RzAnalysisEsil *rz_analysis_esil_new(int stacksize, int iotrap, unsigned int addrsize);
1493 RZ_API bool rz_analysis_esil_setup(RzAnalysisEsil *esil, RzAnalysis *analysis, int romem, int stats, int nonull);
1495 RZ_API bool rz_analysis_esil_runword(RzAnalysisEsil *esil, const char *word);
1496 RZ_API bool rz_analysis_esil_parse(RzAnalysisEsil *esil, const char *str);
1499 RZ_API int rz_analysis_esil_reg_read(RzAnalysisEsil *esil, const char *regname, ut64 *num, int *size);
1500 RZ_API int rz_analysis_esil_reg_write(RzAnalysisEsil *esil, const char *dst, ut64 num);
1502 RZ_API bool rz_analysis_esil_push(RzAnalysisEsil *esil, const char *str);
1504 RZ_API const char *rz_analysis_esil_trapstr(int type);
1508 RZ_API int rz_analysis_esil_get_parm(RzAnalysisEsil *esil, const char *str, ut64 *num);
1509 RZ_API int rz_analysis_esil_condition(RzAnalysisEsil *esil, const char *str);
1510 
1511 // esil_interrupt.c
1520 
1521 RZ_API void rz_analysis_esil_mem_ro(RzAnalysisEsil *esil, int mem_readonly);
1522 RZ_API void rz_analysis_esil_stats(RzAnalysisEsil *esil, int enable);
1523 
1524 /* new trace implementation */
1525 typedef enum {
1526  RZ_IL_TRACE_OP_READ,
1527  RZ_IL_TRACE_OP_WRITE
1528 } RzILTraceOpType;
1529 
1530 typedef struct {
1531  ut64 addr;
1532  RzILTraceOpType behavior;
1533  ut8 data_buf[32];
1534  int data_len;
1535 } RzILTraceMemOp;
1536 
1537 typedef struct {
1538  const char *reg_name;
1539  RzILTraceOpType behavior;
1540  ut64 value;
1541 } RzILTraceRegOp;
1542 
1543 typedef enum {
1544  RZ_IL_TRACE_INS_HAS_MEM_R = 0x1U,
1545  RZ_IL_TRACE_INS_HAS_MEM_W = 0x2U,
1546  RZ_IL_TRACE_INS_HAS_REG_R = 0x4U,
1547  RZ_IL_TRACE_INS_HAS_REG_W = 0x8U
1548 } RzILTraceInsOp;
1549 
1550 typedef struct {
1551  ut64 addr;
1552  ut32 stats;
1553 
1554  RzPVector *write_mem_ops;
1555  RzPVector *read_mem_ops;
1556 
1557  RzPVector *write_reg_ops;
1558  RzPVector *read_reg_ops;
1559 } RzILTraceInstruction;
1560 
1561 /* Independent Trace Functions */
1562 RZ_API RzILTraceInstruction *rz_analysis_il_trace_instruction_new(ut64 addr);
1563 RZ_API void rz_analysis_il_trace_instruction_free(RzILTraceInstruction *instruction);
1564 RZ_API bool rz_analysis_il_trace_add_mem(RzILTraceInstruction *trace, RzILTraceMemOp *mem);
1565 RZ_API bool rz_analysis_il_trace_add_reg(RzILTraceInstruction *trace, RzILTraceRegOp *reg);
1566 RZ_API RzILTraceMemOp *rz_analysis_il_get_mem_op_trace(RzILTraceInstruction *trace, ut64 addr, RzILTraceOpType op_type);
1567 RZ_API RzILTraceRegOp *rz_analysis_il_get_reg_op_trace(RzILTraceInstruction *trace, const char *regname, RzILTraceOpType op_type);
1568 RZ_API bool rz_analysis_il_mem_trace_contains(RzILTraceInstruction *trace, ut64 addr, RzILTraceOpType op_type);
1569 RZ_API bool rz_analysis_il_reg_trace_contains(RzILTraceInstruction *trace, const char *regname, RzILTraceOpType op_type);
1570 
1571 /* ESIL trace */
1579 
1580 /* RzIL */
1584  RZ_NONNULL const char *name, RZ_NONNULL RZ_OWN RzILVal *val);
1585 RZ_API RZ_OWN RzAnalysisILConfig *rz_analysis_il_config_new(ut32 pc_size, bool big_endian, ut32 mem_key_size);
1588 
1594 RZ_API bool rz_analysis_il_vm_setup(RzAnalysis *analysis);
1596 
1597 /* trace */
1601 
1603 
1604 /* fcn.c */
1607 
1608 // Use rz_analysis_get_functions_in¿() instead
1611 
1613 
1618  ut64 addr, ut64 size,
1620 RZ_API bool rz_analysis_check_fcn(RzAnalysis *analysis, ut8 *buf, ut16 bufsz, ut64 addr, ut64 low, ut64 high);
1622 
1626 
1627 RZ_API bool rz_analysis_task_item_new(RZ_NONNULL RzAnalysis *analysis, RZ_NONNULL RzVector /*<RzAnalysisTaskItem>*/ *tasks, RZ_NONNULL RzAnalysisFunction *fcn, RZ_NULLABLE RzAnalysisBlock *block, ut64 address);
1628 RZ_API int rz_analysis_run_tasks(RZ_NONNULL RzVector /*<RzAnalysisTaskItem>*/ *tasks);
1629 
1630 #define RZ_ANALYSIS_FCN_VARKIND_LOCAL 'v'
1631 
1632 /* args */
1633 RZ_API int rz_analysis_var_count(RzAnalysis *a, RzAnalysisFunction *fcn, int kind, int type);
1634 
1635 /* vars // globals. not here */
1636 
1651 
1652 typedef bool (*RzAnalysisRefCmp)(RzAnalysisXRef *ref, void *data);
1653 RZ_API RzList /*<RzAnalysisXRef *>*/ *rz_analysis_xref_list_new(void);
1657 RZ_API RzList /*<RzAnalysisXRef *>*/ *rz_analysis_xrefs_get_to(RzAnalysis *analysis, ut64 addr);
1658 RZ_API RzList /*<RzAnalysisXRef *>*/ *rz_analysis_xrefs_get_from(RzAnalysis *analysis, ut64 addr);
1659 RZ_API RZ_OWN RzList /*<RzAnalysisXRef *>*/ *rz_analysis_xrefs_list(RzAnalysis *analysis);
1665 
1666 RZ_API RzList /*<RzAnalysisFunction *>*/ *rz_analysis_get_fcns(RzAnalysis *analysis);
1667 
1668 /* var.c */
1669 RZ_API RZ_OWN char *rz_analysis_function_autoname_var(RzAnalysisFunction *fcn, char kind, const char *pfx, int ptr);
1681 
1682 // There could be multiple vars used in multiple functions. Use rz_analysis_get_functions_in()+rz_analysis_function_get_vars_used_at() instead.
1684 
1685 RZ_API bool rz_analysis_var_rename(RzAnalysisVar *var, const char *new_name, bool verbose);
1687 RZ_API void rz_analysis_var_set_type(RzAnalysisVar *var, RZ_OWN RzType *type, bool resolve_overlaps);
1690 RZ_API void rz_analysis_var_set_access(RzAnalysisVar *var, const char *reg, ut64 access_addr, int access_type, st64 stackptr);
1695 
1696 // Get the access to var at exactly addr if there is one
1698 
1700 
1702 RZ_API void rz_analysis_extract_rarg(RzAnalysis *analysis, RzAnalysisOp *op, RzAnalysisFunction *fcn, int *reg_set, int *count);
1703 
1704 // Get the variable that var is written to at one of its accesses
1705 // Useful for cases where a register-based argument is written away into a stack variable,
1706 // so if var is the reg arg then this will return the stack var.
1708 
1709 typedef struct rz_analysis_fcn_vars_cache {
1710  RzList *bvars;
1711  RzList *rvars;
1712  RzList *svars;
1713 } RzAnalysisFcnVarsCache;
1714 RZ_API void rz_analysis_fcn_vars_cache_init(RzAnalysis *analysis, RzAnalysisFcnVarsCache *cache, RzAnalysisFunction *fcn);
1715 RZ_API void rz_analysis_fcn_vars_cache_fini(RzAnalysisFcnVarsCache *cache);
1716 
1718  RZ_NULLABLE RzAnalysisFcnVarsCache *reuse_cache, RZ_NULLABLE const char *fcn_name_pre, RZ_NULLABLE const char *fcn_name_post);
1719 
1721 
1722 // Global vars
1734 RZ_API RZ_OWN RzList /*<RzAnalysisVarGlobal *>*/ *rz_analysis_var_global_get_all(RzAnalysis *analysis);
1735 RZ_API bool rz_analysis_var_global_rename(RzAnalysis *analysis, RZ_NONNULL const char *old_name, RZ_NONNULL const char *newname);
1739 
1740 // Maintaining type links
1746 RZ_API RZ_OWN RzList /*<RzType *>*/ *rz_analysis_type_links(RzAnalysis *analysis);
1748 RZ_API RZ_OWN RzList /*<RzTypePath *>*/ *rz_analysis_type_paths_by_address(RzAnalysis *analysis, ut64 addr);
1749 
1750 /* project */
1751 RZ_API bool rz_analysis_xrefs_init(RzAnalysis *analysis);
1752 
1753 #define RZ_ANALYSIS_THRESHOLDFCN 0.7F
1754 #define RZ_ANALYSIS_THRESHOLDBB 0.7F
1755 
1756 /* diff.c */
1758 RZ_API void rz_analysis_diff_setup(RzAnalysis *analysis, int doops, double thbb, double thfcn);
1759 RZ_API void rz_analysis_diff_setup_i(RzAnalysis *analysis, int doops, int thbb, int thfcn);
1764 RZ_API int rz_analysis_diff_fcn(RzAnalysis *analysis, RzList /*<RzAnalysisFunction *>*/ *fcns, RzList /*<RzAnalysisFunction *>*/ *fcns2);
1765 RZ_API int rz_analysis_diff_eval(RzAnalysis *analysis);
1766 
1767 /* value.c */
1775 
1783 
1784 /* jmptbl */
1785 RZ_API bool rz_analysis_jmptbl(RzAnalysis *analysis, RzAnalysisFunction *fcn, RzAnalysisBlock *block, ut64 jmpaddr, ut64 table, ut64 tablesize, ut64 default_addr);
1786 
1787 typedef struct rz_jmptable_params_t {
1788  ut64 jmp_address;
1789  st64 case_shift;
1790  ut64 jmptbl_loc;
1791  ut64 casetbl_loc;
1792  ut64 jmptbl_off;
1793  ut64 entry_size;
1794  ut64 table_count;
1795  ut64 default_case;
1796  RzVector *tasks;
1797 } RzAnalysisJmpTableParams;
1798 
1799 RZ_API bool rz_analysis_get_delta_jmptbl_info(RZ_NONNULL RzAnalysis *analysis, RZ_NONNULL RzAnalysisFunction *fcn, ut64 jmp_address, ut64 lea_address, RZ_NONNULL RzAnalysisJmpTableParams *params);
1800 RZ_API bool rz_analysis_get_jmptbl_info(RZ_NONNULL RzAnalysis *analysis, RZ_NONNULL RzAnalysisFunction *fcn, RZ_NONNULL RzAnalysisBlock *block, ut64 jmp_address, RZ_NONNULL RzAnalysisJmpTableParams *params);
1801 RZ_API bool rz_analysis_walkthrough_jmptbl(RZ_NONNULL RzAnalysis *analysis, RZ_NONNULL RzAnalysisFunction *fcn, RZ_NONNULL RzAnalysisBlock *block, RZ_NONNULL RzAnalysisJmpTableParams *params);
1802 RZ_API bool rz_analysis_walkthrough_casetbl(RZ_NONNULL RzAnalysis *analysis, RZ_NONNULL RzAnalysisFunction *fcn, RZ_NONNULL RzAnalysisBlock *block, RZ_NONNULL RzAnalysisJmpTableParams *params);
1804 
1805 /* reflines.c */
1806 RZ_API RzList /*<RzAnalysisRefline *>*/ *rz_analysis_reflines_get(RzAnalysis *analysis,
1807  ut64 addr, const ut8 *buf, ut64 len, int nlines, int linesout, int linescall);
1808 RZ_API int rz_analysis_reflines_middle(RzAnalysis *analysis, RzList /*<RzAnalysisRefline *>*/ *list, ut64 addr, int len);
1809 RZ_API RzAnalysisRefStr *rz_analysis_reflines_str(void *core, ut64 addr, int opts);
1811 RZ_API RzList /*<RzAnalysisVar *>*/ *rz_analysis_var_list(RzAnalysis *analysis, RzAnalysisFunction *fcn, int kind);
1812 RZ_DEPRECATE RZ_API RzList /*<RzAnalysisVar *>*/ *rz_analysis_var_all_list(RzAnalysis *analysis, RzAnalysisFunction *fcn);
1813 RZ_DEPRECATE RZ_API RzList /*<RzAnalysisVarField *>*/ *rz_analysis_function_get_var_fields(RzAnalysisFunction *fcn, int kind);
1814 
1815 // calling conventions API
1816 RZ_API bool rz_analysis_cc_exist(RzAnalysis *analysis, const char *convention);
1817 RZ_API void rz_analysis_cc_del(RzAnalysis *analysis, const char *name);
1818 RZ_API bool rz_analysis_cc_set(RzAnalysis *analysis, const char *expr);
1819 RZ_API char *rz_analysis_cc_get(RzAnalysis *analysis, const char *name);
1820 RZ_API const char *rz_analysis_cc_arg(RzAnalysis *analysis, const char *convention, int n);
1821 RZ_API const char *rz_analysis_cc_self(RzAnalysis *analysis, const char *convention);
1822 RZ_API void rz_analysis_cc_set_self(RzAnalysis *analysis, const char *convention, const char *self);
1823 RZ_API const char *rz_analysis_cc_error(RzAnalysis *analysis, const char *convention);
1824 RZ_API void rz_analysis_cc_set_error(RzAnalysis *analysis, const char *convention, const char *error);
1825 RZ_API int rz_analysis_cc_max_arg(RzAnalysis *analysis, const char *cc);
1826 RZ_API const char *rz_analysis_cc_ret(RzAnalysis *analysis, const char *convention);
1827 RZ_API const char *rz_analysis_cc_default(RzAnalysis *analysis);
1828 RZ_API void rz_analysis_set_cc_default(RzAnalysis *analysis, const char *convention);
1829 RZ_API const char *rz_analysis_syscc_default(RzAnalysis *analysis);
1830 RZ_API void rz_analysis_set_syscc_default(RzAnalysis *analysis, const char *convention);
1831 RZ_API const char *rz_analysis_cc_func(RzAnalysis *analysis, const char *func_name);
1832 RZ_API RzList /*<char *>*/ *rz_analysis_calling_conventions(RzAnalysis *analysis);
1833 
1834 typedef struct rz_analysis_data_t {
1835  ut64 addr;
1836  int type;
1837  ut64 ptr;
1838  char *str;
1839  int len;
1840  ut8 *buf;
1841  ut8 sbuf[8];
1842 } RzAnalysisData;
1843 
1844 RZ_API RzAnalysisData *rz_analysis_data(RzAnalysis *analysis, ut64 addr, const ut8 *buf, int size, int wordsize);
1845 RZ_API const char *rz_analysis_data_kind(RzAnalysis *analysis, ut64 addr, const ut8 *buf, int len);
1846 RZ_API RzAnalysisData *rz_analysis_data_new_string(ut64 addr, const char *p, int size, int wide);
1847 RZ_API RzAnalysisData *rz_analysis_data_new(ut64 addr, int type, ut64 n, const ut8 *buf, int len);
1848 RZ_API void rz_analysis_data_free(RzAnalysisData *d);
1849 #include <rz_cons.h>
1850 RZ_API char *rz_analysis_data_to_string(RzAnalysisData *d, RzConsPrintablePalette *pal);
1851 
1852 /* meta
1853  *
1854  * Meta uses Condret's Klemmbaustein Priciple, i.e. intervals are defined inclusive/inclusive.
1855  * A meta item from 0x42 to 0x42 has a size of 1. Items with size 0 do not exist.
1856  * Meta items are allowed to overlap and the internal data structure allows for multiple meta items
1857  * starting at the same address.
1858  * Meta items are saved in an RzIntervalTree. To access the interval of an item, use the members of RzIntervalNode.
1859  */
1860 
1861 static inline ut64 rz_meta_item_size(ut64 start, ut64 end) {
1862  // meta items use inclusive/inclusive intervals
1863  return end - start + 1;
1864 }
1865 
1866 static inline ut64 rz_meta_node_size(RzIntervalNode *node) {
1867  return rz_meta_item_size(node->start, node->end);
1868 }
1869 
1870 // Set a meta item at addr with the given contents in the current space.
1871 // If there already exists an item with this type and space at addr (regardless of its size) it will be overwritten.
1873 
1874 // Same as rz_meta_set() but also sets the subtype.
1876 
1877 // Delete all meta items in the current space that intersect with the given interval.
1878 // If size == UT64_MAX, everything in the current space will be deleted.
1880 
1881 // Same as rz_meta_set() with a size of 1.
1883 
1884 // Convenience function to get the str content of the item at addr with given type in the current space.
1886 
1887 // Convenience function to add an RZ_META_TYPE_DATA item at the given addr in the current space.
1889 
1890 // Returns the item with given type that starts at addr in the current space or NULL. The size of this item optionally returned through size.
1892 
1893 // Returns the node for one meta item with the given type that contains addr in the current space or NULL.
1894 // To get all the nodes, use rz_meta_get_all_in().
1896 
1897 // Returns all nodes for items starting at the given address in the current space.
1898 RZ_API RzPVector /*<RzIntervalNode<RMetaItem> *>*/ *rz_meta_get_all_at(RzAnalysis *a, ut64 at);
1899 
1900 // Returns all nodes for items with the given type containing the given address in the current space.
1901 RZ_API RzPVector /*<RzIntervalNode<RMetaItem> *>*/ *rz_meta_get_all_in(RzAnalysis *a, ut64 at, RzAnalysisMetaType type);
1902 
1903 // Returns all nodes for items with the given type intersecting the given interval in the current space.
1905 
1906 // Delete all meta items in the given space
1907 RZ_API void rz_meta_space_unset_for(RzAnalysis *a, const RzSpace *space);
1908 
1909 // Returns the number of meta items in the given space
1910 RZ_API int rz_meta_space_count_for(RzAnalysis *a, const RzSpace *space);
1911 
1912 // Shift all meta items by the given delta, for rebasing between different memory layouts.
1913 RZ_API void rz_meta_rebase(RzAnalysis *analysis, ut64 diff);
1914 
1915 // Calculate the total size covered by meta items of the given type.
1917 
1918 RZ_API const char *rz_meta_type_to_string(int type);
1919 
1920 /* hints */
1921 
1922 RZ_API void rz_analysis_hint_del(RzAnalysis *analysis, ut64 addr, ut64 size); // delete all hints that are contained within the given range, if size > 1, this operation is quite heavy!
1925 RZ_API void rz_analysis_hint_set_syntax(RzAnalysis *a, ut64 addr, const char *syn);
1931 RZ_API void rz_analysis_hint_set_offset(RzAnalysis *a, ut64 addr, const char *typeoff);
1941 RZ_API void rz_analysis_hint_set_arch(RzAnalysis *a, ut64 addr, RZ_NULLABLE const char *arch); // arch == NULL => use global default
1942 RZ_API void rz_analysis_hint_set_bits(RzAnalysis *a, ut64 addr, int bits); // bits == NULL => use global default
1961 RZ_API RZ_NULLABLE const RzVector /*<const RzAnalysisAddrHintRecord>*/ *rz_analysis_addr_hints_at(RzAnalysis *analysis, ut64 addr);
1962 typedef bool (*RzAnalysisAddrHintRecordsCb)(ut64 addr, const RzVector /*<const RzAnalysisAddrHintRecord>*/ *records, void *user);
1963 RZ_API void rz_analysis_addr_hints_foreach(RzAnalysis *analysis, RzAnalysisAddrHintRecordsCb cb, void *user);
1964 typedef bool (*RzAnalysisArchHintCb)(ut64 addr, RZ_NULLABLE const char *arch, void *user);
1965 RZ_API void rz_analysis_arch_hints_foreach(RzAnalysis *analysis, RzAnalysisArchHintCb cb, void *user);
1966 typedef bool (*RzAnalysisBitsHintCb)(ut64 addr, int bits, void *user);
1967 RZ_API void rz_analysis_bits_hints_foreach(RzAnalysis *analysis, RzAnalysisBitsHintCb cb, void *user);
1968 
1969 // get the hint-specified arch value to be considered at addr
1970 // hint_addr will optionally be set to the address where the hint that specifies this arch is placed or UT64_MAX
1971 // if there is no hint affecting addr.
1973 
1974 // get the hint-specified bits value to be considered at addr
1975 // hint_addr will optionally be set to the address where the hint that specifies this arch is placed or UT64_MAX
1976 // if there is no hint affecting addr.
1977 RZ_API int rz_analysis_hint_bits_at(RzAnalysis *analysis, ut64 addr, RZ_NULLABLE ut64 *hint_addr);
1978 
1979 RZ_API RzAnalysisHint *rz_analysis_hint_get(RzAnalysis *analysis, ut64 addr); // accumulate all available hints affecting the given address
1980 
1981 /* switch.c APIs */
1985 
1986 /* cycles.c */
1989 
1990 /* labels */
1996 
1997 /* limits */
2000 
2001 /* no-return stuff */
2002 RZ_API bool rz_analysis_noreturn_add(RzAnalysis *analysis, const char *name, ut64 addr);
2003 RZ_API bool rz_analysis_noreturn_drop(RzAnalysis *analysis, const char *expr);
2006 RZ_API RzList /*<char *>*/ *rz_analysis_noreturn_functions(RzAnalysis *analysis);
2007 
2008 /* vtables */
2009 typedef struct {
2010  RzAnalysis *analysis;
2011  RzAnalysisCPPABI abi;
2012  ut8 word_size;
2013  bool (*read_addr)(RzAnalysis *analysis, ut64 addr, ut64 *buf);
2014 } RVTableContext;
2015 
2016 typedef struct vtable_info_t {
2017  ut64 saddr; // starting address
2018  RzVector methods;
2019 } RVTableInfo;
2020 
2021 typedef struct vtable_method_info_t {
2022  ut64 addr; // addr of the function
2023  ut64 vtable_offset; // offset inside the vtable
2024 } RVTableMethodInfo;
2025 
2026 RZ_API void rz_analysis_vtable_info_free(RVTableInfo *vtable);
2027 RZ_API ut64 rz_analysis_vtable_info_get_size(RVTableContext *context, RVTableInfo *vtable);
2028 RZ_API bool rz_analysis_vtable_begin(RzAnalysis *analysis, RVTableContext *context);
2029 RZ_API RVTableInfo *rz_analysis_vtable_parse_at(RVTableContext *context, ut64 addr);
2030 RZ_API RzList /*<RVTableInfo *>*/ *rz_analysis_vtable_search(RVTableContext *context);
2032 
2033 /* rtti */
2034 RZ_API char *rz_analysis_rtti_msvc_demangle_class_name(RVTableContext *context, const char *name);
2039 RZ_API bool rz_analysis_rtti_msvc_print_at_vtable(RVTableContext *context, ut64 addr, RzOutputMode mode, bool strict);
2040 RZ_API void rz_analysis_rtti_msvc_recover_all(RVTableContext *vt_context, RzList /*<RVTableInfo *>*/ *vtables);
2041 
2042 RZ_API char *rz_analysis_rtti_itanium_demangle_class_name(RVTableContext *context, const char *name);
2044 RZ_API void rz_analysis_rtti_itanium_recover_all(RVTableContext *vt_context, RzList /*<RVTableInfo *>*/ *vtables);
2045 
2046 RZ_API char *rz_analysis_rtti_demangle_class_name(RzAnalysis *analysis, const char *name);
2050 
2051 RZ_API RzList /*<RzSearchKeyword *>*/ *rz_analysis_preludes(RzAnalysis *analysis);
2052 RZ_API bool rz_analysis_is_prelude(RzAnalysis *analysis, const ut8 *data, int len);
2053 
2054 /* classes */
2055 typedef enum {
2056  RZ_ANALYSIS_CLASS_METHOD_DEFAULT = 0,
2057  RZ_ANALYSIS_CLASS_METHOD_VIRTUAL,
2058  RZ_ANALYSIS_CLASS_METHOD_VIRTUAL_DESTRUCTOR,
2059  RZ_ANALYSIS_CLASS_METHOD_DESTRUCTOR,
2060  RZ_ANALYSIS_CLASS_METHOD_CONSTRUCTOR
2061 } RzAnalysisMethodType;
2062 
2063 typedef struct rz_analysis_method_t {
2064  char *name;
2065  char *real_name;
2066  ut64 addr;
2067  st64 vtable_offset; // >= 0 if method is virtual, else -1
2068  RzAnalysisMethodType method_type;
2069 } RzAnalysisMethod;
2070 
2071 typedef struct rz_analysis_base_class_t {
2072  char *id; // id to identify the class attr
2073  ut64 offset; // offset of the base class inside the derived class
2074  char *class_name;
2075 } RzAnalysisBaseClass;
2076 
2077 typedef struct rz_analysis_vtable_t {
2078  char *id; // id to identify the class attr
2079  ut64 offset; // offset inside the class
2080  ut64 addr; // where the content of the vtable is
2081  ut64 size; // size (in bytes) of the vtable
2082 } RzAnalysisVTable;
2083 
2084 typedef enum {
2085  RZ_ANALYSIS_CLASS_ERR_SUCCESS = 0,
2086  RZ_ANALYSIS_CLASS_ERR_CLASH,
2087  RZ_ANALYSIS_CLASS_ERR_NONEXISTENT_ATTR,
2088  RZ_ANALYSIS_CLASS_ERR_NONEXISTENT_CLASS,
2089  RZ_ANALYSIS_CLASS_ERR_OTHER
2090 } RzAnalysisClassErr;
2091 
2094 RZ_API RzAnalysisClassErr rz_analysis_class_create(RzAnalysis *analysis, const char *name);
2095 RZ_API void rz_analysis_class_delete(RzAnalysis *analysis, const char *name);
2096 RZ_API bool rz_analysis_class_exists(RzAnalysis *analysis, const char *name);
2097 RZ_API SdbList *rz_analysis_class_get_all(RzAnalysis *analysis, bool sorted);
2098 RZ_API void rz_analysis_class_foreach(RzAnalysis *analysis, SdbForeachCallback cb, void *user);
2099 RZ_API RzAnalysisClassErr rz_analysis_class_rename(RzAnalysis *analysis, const char *old_name, const char *new_name);
2100 
2101 RZ_API void rz_analysis_class_method_fini(RzAnalysisMethod *meth);
2102 RZ_API RzAnalysisClassErr rz_analysis_class_method_get(RzAnalysis *analysis, const char *class_name, const char *meth_name, RzAnalysisMethod *meth);
2103 RZ_API RzAnalysisClassErr rz_analysis_class_method_get_by_addr(RzAnalysis *analysis, const char *class_name, ut64 addr, RzAnalysisMethod *method);
2104 RZ_API RzVector /*<RzAnalysisMethod>*/ *rz_analysis_class_method_get_all(RzAnalysis *analysis, const char *class_name);
2105 RZ_API RzAnalysisClassErr rz_analysis_class_method_set(RzAnalysis *analysis, const char *class_name, RzAnalysisMethod *meth);
2106 RZ_API RzAnalysisClassErr rz_analysis_class_method_rename(RzAnalysis *analysis, const char *class_name, const char *old_meth_name, const char *new_meth_name);
2107 RZ_API RzAnalysisClassErr rz_analysis_class_method_delete(RzAnalysis *analysis, const char *class_name, const char *meth_name);
2108 RZ_API bool rz_analysis_class_method_exists(RzAnalysis *analysis, const char *class_name, const char *meth_name);
2109 RZ_API bool rz_analysis_class_method_exists_by_addr(RzAnalysis *analysis, const char *class_name, ut64 addr);
2110 RZ_API void rz_analysis_class_method_recover(RzAnalysis *analysis, RzBinClass *cls, RzList /*<RzBinSymbol *>*/ *methods);
2111 
2112 RZ_API void rz_analysis_class_base_fini(RzAnalysisBaseClass *base);
2113 RZ_API RzAnalysisClassErr rz_analysis_class_base_get(RzAnalysis *analysis, const char *class_name, const char *base_id, RzAnalysisBaseClass *base);
2114 RZ_API RzVector /*<RzAnalysisBaseClass>*/ *rz_analysis_class_base_get_all(RzAnalysis *analysis, const char *class_name);
2115 RZ_API RzAnalysisClassErr rz_analysis_class_base_set(RzAnalysis *analysis, const char *class_name, RzAnalysisBaseClass *base);
2116 RZ_API RzAnalysisClassErr rz_analysis_class_base_delete(RzAnalysis *analysis, const char *class_name, const char *base_id);
2117 
2118 RZ_API void rz_analysis_class_vtable_fini(RzAnalysisVTable *vtable);
2119 RZ_API RzAnalysisClassErr rz_analysis_class_vtable_get(RzAnalysis *analysis, const char *class_name, const char *vtable_id, RzAnalysisVTable *vtable);
2120 RZ_API RzVector /*<RzAnalysisVTable>*/ *rz_analysis_class_vtable_get_all(RzAnalysis *analysis, const char *class_name);
2121 RZ_API RzAnalysisClassErr rz_analysis_class_vtable_set(RzAnalysis *analysis, const char *class_name, RzAnalysisVTable *vtable);
2122 RZ_API RzAnalysisClassErr rz_analysis_class_vtable_delete(RzAnalysis *analysis, const char *class_name, const char *vtable_id);
2123 
2124 RZ_API RzGraph /*<RzGraphNodeInfo *>*/ *rz_analysis_class_get_inheritance_graph(RzAnalysis *analysis);
2125 
2130 
2131 /* PDB */
2132 RZ_API void rz_parse_pdb_types(const RzTypeDB *typedb, const RzPdb *pdb);
2133 
2134 /* DWARF */
2137 
2138 /* serialize */
2142 
2143 typedef void *RzSerializeAnalDiffParser;
2144 RZ_API RzSerializeAnalDiffParser rz_serialize_analysis_diff_parser_new(void);
2145 RZ_API void rz_serialize_analysis_diff_parser_free(RzSerializeAnalDiffParser parser);
2149 
2152 
2153 typedef void *RzSerializeAnalGlobalVarParser;
2155 RZ_API RzSerializeAnalGlobalVarParser rz_serialize_analysis_global_var_parser_new(void);
2156 RZ_API void rz_serialize_analysis_global_var_parser_free(RzSerializeAnalGlobalVarParser parser);
2158 
2163 RZ_API bool rz_serialize_analysis_blocks_load(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis, RzSerializeAnalDiffParser diff_parser, RZ_NULLABLE RzSerializeResultInfo *res);
2164 
2165 typedef void *RzSerializeAnalVarParser;
2166 RZ_API RzSerializeAnalVarParser rz_serialize_analysis_var_parser_new(void);
2167 RZ_API void rz_serialize_analysis_var_parser_free(RzSerializeAnalVarParser parser);
2169 
2174 typedef struct analysis_bytes_t {
2175  RzAnalysisOp *op;
2176  RzAnalysisHint *hint;
2177  char *opcode;
2178  char *disasm;
2179  char *pseudo;
2180  char *description;
2181  char *mask;
2182  char *bytes;
2183  int oplen;
2184 } RzAnalysisBytes;
2185 
2187 RZ_API bool rz_serialize_analysis_functions_load(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis, RzSerializeAnalDiffParser diff_parser, RZ_NULLABLE RzSerializeResultInfo *res);
2200 RZ_API void rz_serialize_analysis_sign_save(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis);
2201 RZ_API bool rz_serialize_analysis_sign_load(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis, RZ_NULLABLE RzSerializeResultInfo *res);
2206 
2209 
2210 /* plugin pointers */
2253 extern RzAnalysisPlugin rz_analysis_plugin_tms320c64x;
2259 extern RzAnalysisPlugin rz_analysis_plugin_x86;
2261 extern RzAnalysisPlugin rz_analysis_plugin_x86_im;
2262 extern RzAnalysisPlugin rz_analysis_plugin_x86_simple;
2263 extern RzAnalysisPlugin rz_analysis_plugin_x86_udis;
2270 #ifdef __cplusplus
2271 }
2272 #endif
2273 
2274 #endif
2275 #endif
size_t len
Definition: 6502dis.c:15
ut8 op
Definition: 6502dis.c:13
RZ_API void rz_analysis_diff_free(RzAnalysisDiff *diff)
Definition: diff.c:22
RZ_API size_t rz_analysis_diff_fingerprint_fcn(RzAnalysis *analysis, RzAnalysisFunction *fcn)
Definition: diff.c:91
RZ_API int rz_analysis_diff_fingerprint_bb(RzAnalysis *analysis, RzAnalysisBlock *bb)
Definition: diff.c:49
RZ_API RZ_OWN RzAnalysisDiff * rz_analysis_diff_new(void)
Definition: diff.c:9
RZ_API int rz_analysis_diff_eval(RzAnalysis *analysis)
Definition: diff.c:283
RZ_API void rz_analysis_diff_setup(RzAnalysis *analysis, int doops, double thbb, double thfcn)
Definition: diff.c:31
RZ_API void rz_analysis_diff_setup_i(RzAnalysis *analysis, int doops, int thbb, int thfcn)
Definition: diff.c:40
RZ_API int rz_analysis_diff_fcn(RzAnalysis *analysis, RzList *fcns1, RzList *fcns2)
Definition: diff.c:176
RZ_API bool rz_analysis_diff_bb(RzAnalysis *analysis, RzAnalysisFunction *fcn, RzAnalysisFunction *fcn2)
Definition: diff.c:112
RZ_API RZ_OWN char * rz_analysis_function_name_guess(RzTypeDB *typedb, RZ_NONNULL char *name)
Checks if varions function name variations present in the database.
Definition: function.c:458
RZ_API void rz_analysis_function_add_block(RzAnalysisFunction *fcn, RzAnalysisBlock *bb)
Definition: function.c:264
RZ_API RZ_BORROW RzList * rz_analysis_function_list(RzAnalysis *analysis)
Definition: function.c:378
RZ_API bool rz_analysis_function_is_autonamed(RZ_NONNULL char *name)
Checks if the function name was generated by Rizin automatically.
Definition: function.c:443
RZ_API RzAnalysisFunction * rz_analysis_get_function_at(RzAnalysis *analysis, ut64 addr)
Definition: function.c:184
RZ_API ut64 rz_analysis_function_max_addr(RzAnalysisFunction *fcn)
Definition: function.c:328
RZ_API ut64 rz_analysis_function_size_from_entry(RzAnalysisFunction *fcn)
Definition: function.c:333
RZ_API RzList * rz_analysis_get_functions_in(RzAnalysis *analysis, ut64 addr)
Definition: function.c:20
RZ_API bool rz_analysis_function_relocate(RzAnalysisFunction *fcn, ut64 addr)
Definition: function.c:204
RZ_API ut64 rz_analysis_function_linear_size(RzAnalysisFunction *fcn)
Definition: function.c:318
RZ_API void rz_analysis_function_remove_block(RzAnalysisFunction *fcn, RzAnalysisBlock *bb)
Definition: function.c:286
RZ_API ut64 rz_analysis_function_realsize(const RzAnalysisFunction *fcn)
Definition: function.c:338
RZ_API bool rz_analysis_add_function(RzAnalysis *analysis, RzAnalysisFunction *fcn)
Definition: function.c:129
RZ_API bool rz_analysis_function_was_modified(RzAnalysisFunction *fcn)
Definition: function.c:366
RZ_API bool rz_analysis_function_rename(RzAnalysisFunction *fcn, const char *name)
Definition: function.c:240
RZ_API RzAnalysisFunction * rz_analysis_function_new(RzAnalysis *analysis)
Definition: function.c:70
RZ_API RzAnalysisFunction * rz_analysis_create_function(RzAnalysis *analysis, const char *name, ut64 addr, int type, RzAnalysisDiff *diff)
Definition: function.c:146
RZ_API bool rz_analysis_function_delete(RzAnalysisFunction *fcn)
Definition: function.c:180
RZ_API ut64 rz_analysis_function_min_addr(RzAnalysisFunction *fcn)
Definition: function.c:323
RZ_API void rz_analysis_function_free(void *_fcn)
Definition: function.c:92
RZ_API bool rz_analysis_function_contains(RzAnalysisFunction *fcn, ut64 addr)
Definition: function.c:361
RZ_API char * rz_analysis_value_to_string(RzAnalysisValue *value)
Definition: value.c:83
RZ_API ut64 rz_analysis_value_to_ut64(RzAnalysis *analysis, RzAnalysisValue *val)
Definition: value.c:41
RZ_API int rz_analysis_value_set_ut64(RzAnalysis *analysis, RzAnalysisValue *val, ut64 num)
Definition: value.c:65
RZ_API void rz_analysis_value_free(RzAnalysisValue *value)
Definition: value.c:29
RZ_API RzAnalysisValue * rz_analysis_value_new_from_string(const char *str)
Definition: value.c:10
RZ_API RzAnalysisValue * rz_analysis_value_new(void)
Definition: value.c:6
RZ_API RzAnalysisValue * rz_analysis_value_copy(RzAnalysisValue *ov)
Definition: value.c:15
RZ_API bool rz_analysis_noreturn_at_addr(RzAnalysis *analysis, ut64 addr)
Definition: analysis.c:557
RZ_API RzList * rz_analysis_noreturn_functions(RzAnalysis *analysis)
Definition: analysis.c:623
RZ_API void rz_analysis_unset_limits(RzAnalysis *analysis)
Definition: analysis.c:24
RZ_API void rz_analysis_set_cpu(RzAnalysis *analysis, const char *cpu)
Definition: analysis.c:311
RZ_API int rz_analysis_add(RzAnalysis *analysis, RzAnalysisPlugin *p)
Definition: analysis.c:179
RZ_API ut8 * rz_analysis_mask(RzAnalysis *analysis, ut32 size, const ut8 *data, ut64 at)
Definition: analysis.c:334
RZ_API RzAnalysis * rz_analysis_free(RzAnalysis *a)
Definition: analysis.c:137
RZ_API bool rz_analysis_set_triplet(RzAnalysis *analysis, const char *os, const char *arch, int bits)
Definition: analysis.c:243
RZ_API RzList * rz_analysis_preludes(RzAnalysis *analysis)
Definition: analysis.c:669
RZ_API void rz_analysis_add_import(RzAnalysis *analysis, const char *imp)
Definition: analysis.c:693
RZ_API void rz_analysis_bind(RzAnalysis *analysis, RzAnalysisBind *b)
Definition: analysis.c:661
RZ_API bool rz_analysis_is_prelude(RzAnalysis *analysis, const ut8 *data, int len)
Definition: analysis.c:676
RZ_API void rz_analysis_purge_imports(RzAnalysis *analysis)
Definition: analysis.c:719
RZ_API bool rz_analysis_set_bits(RzAnalysis *analysis, int bits)
Definition: analysis.c:270
RZ_API RzAnalysis * rz_analysis_new(void)
Definition: analysis.c:63
RZ_API void rz_analysis_trace_bb(RzAnalysis *analysis, ut64 addr)
Definition: analysis.c:377
RZ_API void rz_analysis_purge(RzAnalysis *analysis)
Definition: analysis.c:433
RZ_API int rz_analysis_archinfo(RzAnalysis *analysis, int query)
Definition: analysis.c:449
RZ_API int rz_analysis_get_address_bits(RzAnalysis *analysis)
The actual size of an address in bits.
Definition: analysis.c:303
RZ_API RzAnalysisOp * rz_analysis_op_hexstr(RzAnalysis *analysis, ut64 addr, const char *str)
Definition: analysis.c:398
RZ_API bool rz_analysis_noreturn_add(RzAnalysis *analysis, const char *name, ut64 addr)
Definition: analysis.c:466
RZ_API void rz_analysis_set_limits(RzAnalysis *analysis, ut64 from, ut64 to)
Definition: analysis.c:15
RZ_API bool rz_analysis_set_reg_profile(RzAnalysis *analysis)
Definition: analysis.c:218
RZ_API bool rz_analysis_noreturn_drop(RzAnalysis *analysis, const char *expr)
Definition: analysis.c:514
RZ_API RzList * rz_analysis_get_fcns(RzAnalysis *analysis)
Definition: analysis.c:392
RZ_API void rz_analysis_remove_import(RzAnalysis *analysis, const char *imp)
Definition: analysis.c:708
RZ_API int rz_analysis_set_big_endian(RzAnalysis *analysis, int bigend)
Definition: analysis.c:325
RZ_API bool rz_analysis_use(RzAnalysis *analysis, const char *name)
Definition: analysis.c:184
RZ_API bool rz_analysis_op_is_eob(RzAnalysisOp *op)
Definition: analysis.c:414
RZ_API char * rz_analysis_get_reg_profile(RzAnalysis *analysis)
Definition: analysis.c:212
RZ_API bool rz_analysis_noreturn_at(RzAnalysis *analysis, ut64 addr)
Definition: analysis.c:597
RZ_API bool rz_analysis_set_os(RzAnalysis *analysis, const char *os)
Definition: analysis.c:256
RzAnalysisPlugin rz_analysis_plugin_6502
RzAnalysisPlugin rz_analysis_plugin_8051
RzAnalysisPlugin rz_analysis_plugin_amd29k
RzAnalysisPlugin rz_analysis_plugin_arc
RzAnalysisPlugin rz_analysis_plugin_arm_cs
RzAnalysisPlugin rz_analysis_plugin_avr
Definition: analysis_avr.c:459
RzAnalysisPlugin rz_analysis_plugin_bf
Definition: analysis_bf.c:264
RzAnalysisPlugin rz_analysis_plugin_chip8
RzAnalysisPlugin rz_analysis_plugin_cil
Definition: analysis_cil.c:292
RzAnalysisPlugin rz_analysis_plugin_cr16
RzAnalysisPlugin rz_analysis_plugin_cris
RzAnalysisPlugin rz_analysis_plugin_dalvik
RzAnalysisPlugin rz_analysis_plugin_ebc
Definition: analysis_ebc.c:165
RzAnalysisPlugin rz_analysis_plugin_gb
Definition: analysis_gb.c:1538
RzAnalysisPlugin rz_analysis_plugin_h8300
#define mask()
RzAnalysisPlugin rz_analysis_plugin_hexagon
RzAnalysisPlugin rz_analysis_plugin_i4004
RzAnalysisPlugin rz_analysis_plugin_i8080
RZ_API void rz_analysis_il_vm_cleanup(RzAnalysis *analysis)
Definition: analysis_il.c:303
RZ_API void rz_analysis_il_vm_sync_from_reg(RzAnalysisILVM *vm, RZ_NONNULL RzReg *reg)
Definition: analysis_il.c:213
RZ_API void rz_analysis_il_config_add_label(RZ_NONNULL RzAnalysisILConfig *cfg, RZ_NONNULL RZ_OWN RzILEffectLabel *label)
Definition: analysis_il.c:77
RZ_API void rz_analysis_il_init_state_free(RzAnalysisILInitState *state)
Definition: analysis_il.c:28
RZ_API RZ_OWN RzAnalysisILConfig * rz_analysis_il_config_new(ut32 pc_size, bool big_endian, ut32 mem_key_size)
Definition: analysis_il.c:53
RZ_API bool rz_analysis_il_vm_sync_to_reg(RzAnalysisILVM *vm, RZ_NONNULL RzReg *reg)
Definition: analysis_il.c:226
RZ_API void rz_analysis_il_config_free(RzAnalysisILConfig *cfg)
Definition: analysis_il.c:66
RZ_API RZ_OWN RzAnalysisILVM * rz_analysis_il_vm_new(RzAnalysis *a, RZ_NULLABLE RzReg *init_state_reg)
Definition: analysis_il.c:98
RZ_API bool rz_analysis_il_vm_setup(RzAnalysis *analysis)
Definition: analysis_il.c:285
RZ_API RzAnalysisILInitState * rz_analysis_il_init_state_new()
Definition: analysis_il.c:19
RZ_API RzAnalysisILStepResult rz_analysis_il_vm_step(RZ_NONNULL RzAnalysis *analysis, RZ_NONNULL RzAnalysisILVM *vm, RZ_NULLABLE RzReg *reg)
Definition: analysis_il.c:240
RZ_API void rz_analysis_il_vm_free(RZ_NULLABLE RzAnalysisILVM *vm)
Definition: analysis_il.c:125
RZ_API void rz_analysis_il_init_state_set_var(RZ_NONNULL RzAnalysisILInitState *state, RZ_NONNULL const char *name, RZ_NONNULL RZ_OWN RzILVal *val)
Definition: analysis_il.c:38
RZ_API RzAnalysisRzilTrace * rz_analysis_rzil_trace_new(RzAnalysis *analysis, RZ_NONNULL RzAnalysisILVM *rzil)
RZ_API void rz_analysis_rzil_trace_op(RzAnalysis *analysis, RZ_NONNULL RzAnalysisILVM *rzil, RZ_NONNULL RzAnalysisLiftedILOp op)
RZ_API void rz_analysis_rzil_trace_free(RzAnalysisEsilTrace *trace)
RzAnalysisPlugin rz_analysis_plugin_java
RzAnalysisPlugin rz_analysis_plugin_luac
Definition: analysis_luac.c:24
RzAnalysisPlugin rz_analysis_plugin_m680x_cs
RzAnalysisPlugin rz_analysis_plugin_m68k_cs
RzAnalysisPlugin rz_analysis_plugin_malbolge
RzAnalysisPlugin rz_analysis_plugin_mcore
RzAnalysisPlugin rz_analysis_plugin_mips_cs
RzAnalysisPlugin rz_analysis_plugin_mips_gnu
RzAnalysisPlugin rz_analysis_plugin_msp430
RzAnalysisPlugin rz_analysis_plugin_nios2
RzAnalysisPlugin rz_analysis_plugin_null
Definition: analysis_null.c:18
RzAnalysisPlugin rz_analysis_plugin_or1k
static ut32 cpu[32]
Definition: analysis_or1k.c:21
RzAnalysisPlugin rz_analysis_plugin_pic
RzAnalysisPlugin rz_analysis_plugin_ppc_cs
RzAnalysisPlugin rz_analysis_plugin_propeller
RzAnalysisPlugin rz_analysis_plugin_pyc
Definition: analysis_pyc.c:139
RzAnalysisPlugin rz_analysis_plugin_riscv
RzAnalysisPlugin rz_analysis_plugin_riscv_cs
RzAnalysisPlugin rz_analysis_plugin_rsp
Definition: analysis_rsp.c:688
RzAnalysisPlugin rz_analysis_plugin_sh
Definition: analysis_sh.c:1185
RzAnalysisPlugin rz_analysis_plugin_snes
RzAnalysisPlugin rz_analysis_plugin_sparc_cs
RzAnalysisPlugin rz_analysis_plugin_sparc_gnu
RzAnalysisPlugin rz_analysis_plugin_spc700
RzAnalysisPlugin rz_analysis_plugin_sysz
RzAnalysisPlugin rz_analysis_plugin_tms320
RzAnalysisPlugin rz_analysis_plugin_tricore
RzAnalysisPlugin rz_analysis_plugin_v810
RzAnalysisPlugin rz_analysis_plugin_v850
RzAnalysisPlugin rz_analysis_plugin_vax
Definition: analysis_vax.c:83
RzAnalysisPlugin rz_analysis_plugin_wasm
RzAnalysisPlugin rz_analysis_plugin_x86_cs
RzAnalysisPlugin rz_analysis_plugin_xap
Definition: analysis_xap.c:213
RzAnalysisPlugin rz_analysis_plugin_xcore_cs
RzAnalysisPlugin rz_analysis_plugin_xtensa
RzAnalysisPlugin rz_analysis_plugin_z80
Definition: analysis_z80.c:418
lzma_index ** i
Definition: index.h:629
static RzILOpEffect * cls(cs_insn *insn)
Definition: arm_il64.c:915
ut16 val
Definition: armass64_const.h:6
static ut8 bytes[32]
Definition: asm_arc.c:23
int jump(int a, int b)
Definition: bcj_test.c:35
int bits(struct state *s, int need)
Definition: blast.c:72
RZ_API void rz_analysis_block_set_size(RzAnalysisBlock *block, ut64 size)
Definition: block.c:194
RZ_API bool rz_analysis_block_was_modified(RzAnalysisBlock *block)
Definition: block.c:680
RZ_API void rz_analysis_blocks_foreach_intersect(RzAnalysis *analysis, ut64 addr, ut64 size, RzAnalysisBlockCb cb, void *user)
Definition: block.c:161
RZ_API void rz_analysis_delete_block(RzAnalysisBlock *bb)
Definition: block.c:186
RZ_API RzAnalysisBlock * rz_analysis_block_chop_noreturn(RzAnalysisBlock *block, ut64 addr)
Definition: block.c:766
RZ_API RzList * rz_analysis_block_recurse_list(RzAnalysisBlock *block)
Definition: block.c:567
RZ_API bool rz_analysis_block_relocate(RzAnalysisBlock *block, ut64 addr, ut64 size)
Definition: block.c:213
RZ_API bool rz_analysis_block_set_op_offset(RzAnalysisBlock *block, size_t i, ut16 v)
Definition: block.c:1027
RZ_API void rz_analysis_block_ref(RzAnalysisBlock *bb)
Definition: block.c:40
RZ_API void rz_analysis_block_update_hash(RzAnalysisBlock *block)
Definition: block.c:698
RZ_API bool rz_analysis_block_recurse_depth_first(RzAnalysisBlock *block, RzAnalysisBlockCb cb, RZ_NULLABLE RzAnalysisBlockCb on_exit, void *user)
Definition: block.c:492
RZ_API bool rz_analysis_blocks_foreach_in(RzAnalysis *analysis, ut64 addr, RzAnalysisBlockCb cb, void *user)
Definition: block.c:122
RZ_API RzAnalysisBlock * rz_analysis_get_block_at(RzAnalysis *analysis, ut64 addr)
Definition: block.c:90
RZ_API bool rz_analysis_block_recurse_followthrough(RzAnalysisBlock *block, RzAnalysisBlockCb cb, void *user)
Definition: block.c:458
RZ_API ut64 rz_analysis_block_get_op_size(RzAnalysisBlock *bb, size_t i)
Definition: block.c:1070
RZ_API ut64 rz_analysis_block_get_op_addr(RzAnalysisBlock *block, size_t i)
Definition: block.c:1016
RZ_API void rz_analysis_block_unref(RzAnalysisBlock *bb)
Definition: block.c:370
RZ_API void rz_analysis_block_add_switch_case(RzAnalysisBlock *block, ut64 switch_addr, ut64 case_value, ut64 case_addr)
Definition: block.c:575
RZ_API RzList * rz_analysis_get_blocks_in(RzAnalysis *analysis, ut64 addr)
Definition: block.c:133
RZ_API RzAnalysisBlock * rz_analysis_create_block(RzAnalysis *analysis, ut64 addr, ut64 size)
Definition: block.c:174
RZ_API ut64 rz_analysis_block_get_op_addr_in(RzAnalysisBlock *bb, ut64 off)
Definition: block.c:1048
RZ_API RzList * rz_analysis_get_blocks_intersect(RzAnalysis *analysis, ut64 addr, ut64 size)
Definition: block.c:165
RZ_API bool rz_analysis_block_merge(RzAnalysisBlock *a, RzAnalysisBlock *b)
Definition: block.c:318
RZ_API RzAnalysisBlock * rz_analysis_block_split(RzAnalysisBlock *bbi, ut64 addr)
Definition: block.c:255
RZ_API RzAnalysisBlock * rz_analysis_find_most_relevant_block_in(RzAnalysis *analysis, ut64 off)
Definition: block.c:997
RZ_API bool rz_analysis_block_recurse(RzAnalysisBlock *block, RzAnalysisBlockCb cb, void *user)
Definition: block.c:430
RZ_API bool rz_analysis_block_successor_addrs_foreach(RzAnalysisBlock *block, RzAnalysisAddrCb cb, void *user)
Definition: block.c:384
RZ_API RZ_NULLABLE RzList * rz_analysis_block_shortest_path(RzAnalysisBlock *block, ut64 dst)
Definition: block.c:622
RZ_API ut16 rz_analysis_block_get_op_offset(RzAnalysisBlock *block, size_t i)
Definition: block.c:1006
RZ_API void rz_analysis_block_analyze_ops(RzAnalysisBlock *block)
Definition: block.c:1084
RZ_API bool rz_analysis_block_op_starts_at(RzAnalysisBlock *bb, ut64 addr)
Definition: block.c:582
RZ_API void rz_analysis_block_automerge(RzList *blocks)
Definition: block.c:892
static RzNumCalcValue expr(RzNum *, RzNumCalc *, int)
Definition: calc.c:167
RZ_API bool rz_analysis_add_device_peripheral_map(RzBinObject *o, RzAnalysis *analysis)
Maps the device peripherals as sections.
Definition: canalysis.c:6295
RZ_API const char * rz_analysis_syscc_default(RzAnalysis *analysis)
Definition: cc.c:210
RZ_API void rz_analysis_set_syscc_default(RzAnalysis *analysis, const char *cc)
Definition: cc.c:215
RZ_API const char * rz_analysis_cc_func(RzAnalysis *analysis, const char *func_name)
Definition: cc.c:220
RZ_API void rz_analysis_cc_del(RzAnalysis *analysis, const char *name)
Definition: cc.c:10
RZ_API char * rz_analysis_cc_get(RzAnalysis *analysis, const char *name)
Definition: cc.c:75
RZ_API bool rz_analysis_cc_set(RzAnalysis *analysis, const char *expr)
Definition: cc.c:25
RZ_API void rz_analysis_cc_set_error(RzAnalysis *analysis, const char *convention, const char *error)
Definition: cc.c:162
RZ_API const char * rz_analysis_cc_arg(RzAnalysis *analysis, const char *convention, int n)
Definition: cc.c:122
RZ_API bool rz_analysis_cc_exist(RzAnalysis *analysis, const char *convention)
Definition: cc.c:116
RZ_API void rz_analysis_cc_set_self(RzAnalysis *analysis, const char *convention, const char *self)
Definition: cc.c:145
RZ_API const char * rz_analysis_cc_self(RzAnalysis *analysis, const char *convention)
Definition: cc.c:138
RZ_API const char * rz_analysis_cc_default(RzAnalysis *analysis)
Definition: cc.c:200
RZ_API int rz_analysis_cc_max_arg(RzAnalysis *analysis, const char *cc)
Definition: cc.c:171
RZ_API const char * rz_analysis_cc_error(RzAnalysis *analysis, const char *convention)
Definition: cc.c:155
RZ_API RzList * rz_analysis_calling_conventions(RzAnalysis *analysis)
Definition: cc.c:226
RZ_API const char * rz_analysis_cc_ret(RzAnalysis *analysis, const char *convention)
Definition: cc.c:194
RZ_API void rz_analysis_set_cc_default(RzAnalysis *analysis, const char *cc)
Definition: cc.c:205
RZ_API RzVector * rz_analysis_class_base_get_all(RzAnalysis *analysis, const char *class_name)
Definition: class.c:928
RZ_API void rz_analysis_class_method_recover(RzAnalysis *analysis, RzBinClass *cls, RzList *methods)
Definition: class.c:611
RZ_API bool rz_analysis_class_method_exists_by_addr(RzAnalysis *analysis, const char *class_name, ut64 addr)
Definition: class.c:643
RZ_API RzAnalysisClassErr rz_analysis_class_vtable_delete(RzAnalysis *analysis, const char *class_name, const char *vtable_id)
Definition: class.c:1235
RZ_API RzAnalysisClassErr rz_analysis_class_method_rename(RzAnalysis *analysis, const char *class_name, const char *old_meth_name, const char *new_meth_name)
Definition: class.c:788
RZ_API RzAnalysisClassErr rz_analysis_class_base_set(RzAnalysis *analysis, const char *class_name, RzAnalysisBaseClass *base)
Definition: class.c:983
RZ_API RzVector * rz_analysis_class_method_get_all(RzAnalysis *analysis, const char *class_name)
Definition: class.c:735
RZ_API void rz_analysis_class_base_fini(RzAnalysisBaseClass *base)
Definition: class.c:880
RZ_API bool rz_analysis_class_exists(RzAnalysis *analysis, const char *name)
Definition: class.c:167
RZ_API void rz_analysis_class_recover_all(RzAnalysis *analysis)
Definition: class.c:1321
RZ_API void rz_analysis_class_vtable_fini(RzAnalysisVTable *vtable)
Definition: class.c:1069
RZ_API RzAnalysisClassErr rz_analysis_class_rename(RzAnalysis *analysis, const char *old_name, const char *new_name)
Definition: class.c:196
RZ_API RzAnalysisClassErr rz_analysis_class_method_delete(RzAnalysis *analysis, const char *class_name, const char *meth_name)
Definition: class.c:855
RZ_API RzAnalysisClassErr rz_analysis_class_base_delete(RzAnalysis *analysis, const char *class_name, const char *base_id)
Definition: class.c:1010
RZ_API RzAnalysisClassErr rz_analysis_class_method_get(RzAnalysis *analysis, const char *class_name, const char *meth_name, RzAnalysisMethod *meth)
Definition: class.c:682
RZ_API void rz_analysis_class_recover_from_rzbin(RzAnalysis *analysis)
Definition: class.c:57
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...
Definition: class.c:1261
RZ_API RzAnalysisClassErr rz_analysis_class_vtable_set(RzAnalysis *analysis, const char *class_name, RzAnalysisVTable *vtable)
Definition: class.c:1153
RZ_API RzAnalysisClassErr rz_analysis_class_method_set(RzAnalysis *analysis, const char *class_name, RzAnalysisMethod *meth)
Definition: class.c:770
RZ_API SdbList * rz_analysis_class_get_all(RzAnalysis *analysis, bool sorted)
Definition: class.c:177
RZ_API void rz_analysis_class_method_fini(RzAnalysisMethod *meth)
Definition: class.c:606
RZ_API RzVector * rz_analysis_class_vtable_get_all(RzAnalysis *analysis, const char *class_name)
Definition: class.c:1118
RZ_API void rz_analysis_class_foreach(RzAnalysis *analysis, SdbForeachCallback cb, void *user)
Definition: class.c:181
RZ_API RzAnalysisClassErr rz_analysis_class_create(RzAnalysis *analysis, const char *name)
Definition: class.c:79
RZ_API bool rz_analysis_class_method_exists(RzAnalysis *analysis, const char *class_name, const char *meth_name)
Definition: class.c:634
RZ_API RzAnalysisClassErr rz_analysis_class_base_get(RzAnalysis *analysis, const char *class_name, const char *base_id, RzAnalysisBaseClass *base)
Definition: class.c:885
RZ_API RzAnalysisClassErr rz_analysis_class_method_get_by_addr(RzAnalysis *analysis, const char *class_name, ut64 addr, RzAnalysisMethod *method)
Definition: class.c:659
RZ_API void rz_analysis_class_delete(RzAnalysis *analysis, const char *name)
Definition: class.c:98
RZ_API RzAnalysisClassErr rz_analysis_class_vtable_get(RzAnalysis *analysis, const char *class_name, const char *vtable_id, RzAnalysisVTable *vtable)
Definition: class.c:1073
static int value
Definition: cmd_api.c:93
RZ_API RzAnalysisCond * rz_analysis_cond_new_from_string(const char *str)
Definition: cond.c:108
RZ_API RzAnalysisCond * rz_analysis_cond_new_from_op(RzAnalysisOp *op)
Definition: cond.c:92
RZ_API int rz_analysis_cond_eval(RzAnalysis *analysis, RzAnalysisCond *cond)
Definition: cond.c:50
RZ_API RzAnalysisCond * rz_analysis_cond_new(void)
Definition: cond.c:6
RZ_API void rz_analysis_cond_fini(RzAnalysisCond *c)
Definition: cond.c:10
RZ_API void rz_analysis_cond_free(RzAnalysisCond *c)
Definition: cond.c:19
RZ_API char * rz_analysis_cond_to_string(RzAnalysisCond *cond)
Definition: cond.c:63
#define RZ_API
#define r
Definition: crypto_rc6.c:12
cs_arch arch
Definition: cstool.c:13
RZ_API void rz_analysis_cycle_frame_free(RzAnalysisCycleFrame *cf)
Definition: cycles.c:18
RZ_API RzAnalysisCycleFrame * rz_analysis_cycle_frame_new(void)
Definition: cycles.c:8
static static fork const void static count static fd const char const char static newpath const char static path const char path
Definition: sflib.h:35
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
Definition: sflib.h:98
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 start
Definition: sflib.h:133
RZ_API RzAnalysisData * rz_analysis_data_new(ut64 addr, int type, ut64 n, const ut8 *buf, int len)
Definition: data.c:243
RZ_API const char * rz_analysis_datatype_to_string(RzAnalysisDataType t)
Definition: data.c:409
RZ_API RzAnalysisData * rz_analysis_data(RzAnalysis *analysis, ut64 addr, const ut8 *buf, int size, int wordsize)
Definition: data.c:283
RZ_API const char * rz_analysis_data_kind(RzAnalysis *a, ut64 addr, const ut8 *buf, int len)
Definition: data.c:346
RZ_API RzAnalysisData * rz_analysis_data_new_string(ut64 addr, const char *p, int len, int type)
Definition: data.c:208
RZ_API void rz_analysis_data_free(RzAnalysisData *d)
Definition: data.c:273
RZ_API char * rz_analysis_data_to_string(RzAnalysisData *d, RzConsPrintablePalette *pal)
Definition: data.c:104
uint16_t ut16
uint32_t ut32
const char * v
Definition: dsignal.c:12
RZ_API void rz_analysis_dwarf_process_info(const RzAnalysis *analysis, RzAnalysisDwarfContext *ctx)
Parses type and function information out of DWARF entries and stores them to the sdb for further use.
RZ_API void rz_analysis_dwarf_integrate_functions(RzAnalysis *analysis, RzFlag *flags, Sdb *dwarf_sdb)
Use parsed DWARF function info from Sdb in the function analysis XXX right now we only save parsed na...
RZ_API void rz_analysis_esil_stack_free(RzAnalysisEsil *esil)
Definition: esil.c:3103
RZ_API RzAnalysisEsil * rz_analysis_esil_new(int stacksize, int iotrap, unsigned int addrsize)
Definition: esil.c:85
RZ_API int rz_analysis_esil_get_parm(RzAnalysisEsil *esil, const char *str, ut64 *num)
Definition: esil.c:483
RZ_API bool rz_analysis_esil_pushnum(RzAnalysisEsil *esil, ut64 num)
Definition: esil.c:408
RZ_API int rz_analysis_esil_condition(RzAnalysisEsil *esil, const char *str)
Definition: esil.c:3113
RZ_API bool rz_analysis_esil_set_pc(RzAnalysisEsil *esil, ut64 addr)
Definition: esil.c:155
RZ_API const char * rz_analysis_esil_trapstr(int type)
Definition: esil.c:1412
RZ_API int rz_analysis_esil_mem_write(RzAnalysisEsil *esil, ut64 addr, const ut8 *buf, int len)
Definition: esil.c:341
RZ_API int rz_analysis_esil_reg_read(RzAnalysisEsil *esil, const char *regname, ut64 *num, int *size)
Definition: esil.c:507
RZ_API bool rz_analysis_esil_set_op(RzAnalysisEsil *esil, const char *op, RzAnalysisEsilOpCb code, ut32 push, ut32 pop, ut32 type)
Definition: esil.c:110
RZ_API int rz_analysis_esil_reg_write(RzAnalysisEsil *esil, const char *dst, ut64 num)
Definition: esil.c:487
RZ_API char * rz_analysis_esil_pop(RzAnalysisEsil *esil)
Definition: esil.c:422
RZ_API bool rz_analysis_esil_setup(RzAnalysisEsil *esil, RzAnalysis *analysis, int romem, int stats, int nonull)
Definition: esil.c:3298
RZ_API bool rz_analysis_esil_parse(RzAnalysisEsil *esil, const char *str)
Definition: esil.c:2998
RZ_API bool rz_analysis_esil_push(RzAnalysisEsil *esil, const char *str)
Definition: esil.c:414
RZ_API void rz_analysis_esil_free(RzAnalysisEsil *esil)
Definition: esil.c:163
RZ_API int rz_analysis_esil_get_parm_type(RzAnalysisEsil *esil, const char *str)
Definition: esil.c:430
RZ_API int rz_analysis_esil_mem_read(RzAnalysisEsil *esil, ut64 addr, ut8 *buf, int len)
Definition: esil.c:259
RZ_API bool rz_analysis_esil_runword(RzAnalysisEsil *esil, const char *word)
Definition: esil.c:3095
RZ_API bool rz_analysis_esil_load_interrupts(RzAnalysisEsil *esil, RzAnalysisEsilInterruptHandler *handlers[], ut32 src_id)
RZ_API RzAnalysisEsilInterrupt * rz_analysis_esil_interrupt_new(RzAnalysisEsil *esil, ut32 src_id, RzAnalysisEsilInterruptHandler *ih)
RZ_API bool rz_analysis_esil_load_interrupts_from_lib(RzAnalysisEsil *esil, const char *path)
RZ_API void rz_analysis_esil_interrupts_init(RzAnalysisEsil *esil)
RZ_API bool rz_analysis_esil_set_interrupt(RzAnalysisEsil *esil, RzAnalysisEsilInterrupt *intr)
RZ_API int rz_analysis_esil_fire_interrupt(RzAnalysisEsil *esil, ut32 intr_num)
RZ_API void rz_analysis_esil_interrupt_free(RzAnalysisEsil *esil, RzAnalysisEsilInterrupt *intr)
RZ_API void rz_analysis_esil_interrupts_fini(RzAnalysisEsil *esil)
RZ_API void rz_analysis_esil_mem_ro(RzAnalysisEsil *esil, int mem_readonly)
Definition: esil_stats.c:42
RZ_API void rz_analysis_esil_stats(RzAnalysisEsil *esil, int enable)
Definition: esil_stats.c:50
RZ_API RzAnalysisEsilTrace * rz_analysis_esil_trace_new(RzAnalysisEsil *esil)
Definition: esil_trace.c:28
RZ_API void rz_analysis_esil_trace_restore(RzAnalysisEsil *esil, int idx)
Definition: esil_trace.c:347
RZ_API void rz_analysis_esil_trace_list(RzAnalysisEsil *esil)
Definition: esil_trace.c:434
RZ_API void rz_analysis_esil_trace_free(RzAnalysisEsilTrace *trace)
Definition: esil_trace.c:79
RZ_API void rz_analysis_esil_trace_op(RzAnalysisEsil *esil, RZ_NONNULL RzAnalysisOp *op)
Definition: esil_trace.c:271
RZ_API void rz_analysis_esil_trace_show(RzAnalysisEsil *esil, int idx)
Definition: esil_trace.c:456
RZ_API RZ_BORROW RzILTraceInstruction * rz_analysis_esil_get_instruction_trace(RZ_NONNULL RzAnalysisEsilTrace *etrace, int idx)
Definition: esil_trace.c:263
RZ_API RzAnalysisBlock * rz_analysis_fcn_bbget_at(RzAnalysis *analysis, RzAnalysisFunction *fcn, ut64 addr)
Definition: fcn.c:2063
RZ_API RZ_OWN RzPVector * rz_analysis_function_args(RzAnalysis *a, RzAnalysisFunction *fcn)
Returns vector of all function arguments.
Definition: fcn.c:2481
RZ_API void rz_analysis_fcn_invalidate_read_ahead_cache(void)
Definition: fcn.c:84
RZ_API RzAnalysisFunction * rz_analysis_fcn_next(RzAnalysis *analysis, ut64 addr)
Definition: fcn.c:2015
RZ_API int rz_analysis_function_resize(RzAnalysisFunction *fcn, int newsize)
Definition: fcn.c:90
RZ_API int rz_analysis_run_tasks(RZ_NONNULL RzVector *tasks)
Runs analysis on the task items.
Definition: fcn.c:1509
RZ_API int rz_analysis_fcn_del(RzAnalysis *a, ut64 addr)
Definition: fcn.c:1675
RZ_API ut32 rz_analysis_function_cost(RzAnalysisFunction *fcn)
Definition: fcn.c:2080
RZ_API int rz_analysis_function_loops(RzAnalysisFunction *fcn)
Definition: fcn.c:1784
RZ_DEPRECATE RZ_API RzAnalysisFunction * rz_analysis_get_fcn_in(RzAnalysis *analysis, ut64 addr, int type)
Definition: fcn.c:1687
RZ_API bool rz_analysis_function_purity(RzAnalysisFunction *fcn)
Definition: fcn.c:2136
RZ_API char * rz_analysis_function_get_json(RzAnalysisFunction *function)
Definition: fcn.c:1855
RZ_API RzAnalysisFunction * rz_analysis_get_function_byname(RzAnalysis *a, const char *name)
Definition: fcn.c:1729
RZ_API bool rz_analysis_task_item_new(RZ_NONNULL RzAnalysis *analysis, RZ_NONNULL RzVector *tasks, RZ_NONNULL RzAnalysisFunction *fcn, RZ_NULLABLE RzAnalysisBlock *block, ut64 address)
Adds a new task item to the tasks parameter.
Definition: fcn.c:1488
RZ_API bool rz_analysis_fcn_add_bb(RzAnalysis *a, RzAnalysisFunction *fcn, ut64 addr, ut64 size, ut64 jump, ut64 fail, RZ_BORROW RzAnalysisDiff *diff)
Definition: fcn.c:1739
RZ_DEPRECATE RZ_API RzAnalysisFunction * rz_analysis_get_fcn_in_bounds(RzAnalysis *analysis, ut64 addr, int type)
Definition: fcn.c:1708
RZ_API int rz_analysis_function_count_edges(const RzAnalysisFunction *fcn, RZ_NULLABLE int *ebbs)
Definition: fcn.c:2113
RZ_API bool rz_analysis_function_set_type_str(RzAnalysis *a, RZ_NONNULL RzAnalysisFunction *f, RZ_NONNULL const char *sig)
Parses the function type and sets it for the given function.
Definition: fcn.c:1985
RZ_API int rz_analysis_fcn_count(RzAnalysis *analysis, ut64 from, ut64 to)
Definition: fcn.c:2028
RZ_API size_t rz_analysis_function_arg_count(RzAnalysis *a, RzAnalysisFunction *fcn)
Returns the argument count of a function.
Definition: fcn.c:2460
RZ_API void rz_analysis_function_update_analysis(RzAnalysisFunction *fcn)
Definition: fcn.c:2435
RZ_API void rz_analysis_del_jmprefs(RzAnalysis *analysis, RzAnalysisFunction *fcn)
Definition: fcn.c:1592
RZ_API void rz_analysis_update_analysis_range(RzAnalysis *analysis, ut64 addr, int size)
Definition: fcn.c:2396
RZ_API const char * rz_analysis_fcntype_tostring(int type)
Definition: fcn.c:35
RZ_API int rz_analysis_fcn(RzAnalysis *analysis, RzAnalysisFunction *fcn, ut64 addr, ut64 len, int reftype)
Definition: fcn.c:1606
RZ_API bool rz_analysis_check_fcn(RzAnalysis *analysis, ut8 *buf, ut16 bufsz, ut64 addr, ut64 low, ut64 high)
Definition: fcn.c:1538
RZ_API void rz_analysis_function_check_bp_use(RzAnalysisFunction *fcn)
Definition: fcn.c:2241
RZ_API void rz_analysis_trim_jmprefs(RzAnalysis *analysis, RzAnalysisFunction *fcn)
Definition: fcn.c:1578
RZ_API RZ_OWN RzCallable * rz_analysis_function_derive_type(RzAnalysis *analysis, RzAnalysisFunction *f)
Derives the RzCallable type for the given function.
Definition: fcn.c:2676
RZ_API RzAnalysisBlock * rz_analysis_fcn_bbget_in(const RzAnalysis *analysis, RzAnalysisFunction *fcn, ut64 addr)
Definition: fcn.c:2042
RZ_API RZ_OWN RzList * rz_analysis_types_from_fcn(RzAnalysis *analysis, RzAnalysisFunction *fcn)
Definition: fcn.c:2545
RZ_API bool rz_analysis_function_set_type(RzAnalysis *a, RZ_NONNULL RzAnalysisFunction *f, RZ_NONNULL RzCallable *callable)
Sets the RzCallable type for the given function.
Definition: fcn.c:1922
RZ_API int rz_analysis_fcn_del_locs(RzAnalysis *analysis, ut64 addr)
Definition: fcn.c:1657
RZ_API int rz_analysis_function_complexity(RzAnalysisFunction *fcn)
Definition: fcn.c:1799
RZ_API RZ_OWN char * rz_analysis_function_get_signature(RZ_NONNULL RzAnalysisFunction *function)
Definition: fcn.c:1895
unsigned short prefix[65536]
Definition: gun.c:163
RZ_API void rz_analysis_hint_set_val(RzAnalysis *a, ut64 addr, ut64 v)
Definition: hint.c:275
RZ_API void rz_analysis_hint_set_nword(RzAnalysis *a, ut64 addr, int nword)
Definition: hint.c:209
RZ_API void rz_analysis_hint_unset_nword(RzAnalysis *a, ut64 addr)
Definition: hint.c:319
RZ_API void rz_analysis_hint_set_newbits(RzAnalysis *a, ut64 addr, int bits)
Definition: hint.c:221
RZ_API RZ_NULLABLE const RzVector * rz_analysis_addr_hints_at(RzAnalysis *analysis, ut64 addr)
Definition: hint.c:412
RZ_API RzAnalysisHint * rz_analysis_hint_get(RzAnalysis *a, ut64 addr)
Definition: hint.c:506
RZ_API void rz_analysis_hint_set_high(RzAnalysis *a, ut64 addr)
Definition: hint.c:225
RZ_API void rz_analysis_hint_clear(RzAnalysis *a)
Definition: hint.c:85
RZ_API void rz_analysis_hint_unset_stackframe(RzAnalysis *a, ut64 addr)
Definition: hint.c:359
RZ_API void rz_analysis_hint_unset_newbits(RzAnalysis *a, ut64 addr)
Definition: hint.c:347
RZ_API void rz_analysis_hint_unset_type(RzAnalysis *a, ut64 addr)
Definition: hint.c:355
RZ_API void rz_analysis_addr_hints_foreach(RzAnalysis *analysis, RzAnalysisAddrHintRecordsCb cb, void *user)
Definition: hint.c:426
RZ_API void rz_analysis_hint_set_stackframe(RzAnalysis *a, ut64 addr, ut64 size)
Definition: hint.c:271
RZ_API void rz_analysis_hint_unset_fail(RzAnalysis *a, ut64 addr)
Definition: hint.c:343
RZ_API void rz_analysis_hint_set_ret(RzAnalysis *a, ut64 addr, ut64 val)
Definition: hint.c:241
RZ_API void rz_analysis_hint_unset_offset(RzAnalysis *a, ut64 addr)
Definition: hint.c:335
RZ_API void rz_analysis_hint_unset_size(RzAnalysis *a, ut64 addr)
Definition: hint.c:299
RZ_API void rz_analysis_hint_unset_syntax(RzAnalysis *a, ut64 addr)
Definition: hint.c:323
RZ_API void rz_analysis_hint_unset_jump(RzAnalysis *a, ut64 addr)
Definition: hint.c:339
RZ_API void rz_analysis_hint_set_jump(RzAnalysis *a, ut64 addr, ut64 jump)
Definition: hint.c:213
RZ_API void rz_analysis_hint_unset_arch(RzAnalysis *a, ut64 addr)
Definition: hint.c:363
RZ_API void rz_analysis_hint_set_opcode(RzAnalysis *a, ut64 addr, const char *opcode)
Definition: hint.c:251
RZ_API void rz_analysis_arch_hints_foreach(RzAnalysis *analysis, RzAnalysisArchHintCb cb, void *user)
Definition: hint.c:431
RZ_API void rz_analysis_hint_set_bits(RzAnalysis *a, ut64 addr, int bits)
Definition: hint.c:288
RZ_API void rz_analysis_hint_free(RzAnalysisHint *h)
Definition: hint.c:371
RZ_API void rz_analysis_hint_set_syntax(RzAnalysis *a, ut64 addr, const char *syn)
Definition: hint.c:245
RZ_API int rz_analysis_hint_bits_at(RzAnalysis *analysis, ut64 addr, RZ_NULLABLE ut64 *hint_addr)
Definition: hint.c:397
RZ_API void rz_analysis_hint_del(RzAnalysis *a, ut64 addr, ut64 size)
Definition: hint.c:105
RZ_API RZ_NULLABLE RZ_BORROW const char * rz_analysis_hint_arch_at(RzAnalysis *analysis, ut64 addr, RZ_NULLABLE ut64 *hint_addr)
Definition: hint.c:382
RZ_API void rz_analysis_bits_hints_foreach(RzAnalysis *analysis, RzAnalysisBitsHintCb cb, void *user)
Definition: hint.c:442
RZ_API void rz_analysis_hint_set_fail(RzAnalysis *a, ut64 addr, ut64 fail)
Definition: hint.c:217
RZ_API void rz_analysis_hint_unset_opcode(RzAnalysis *a, ut64 addr)
Definition: hint.c:307
RZ_API void rz_analysis_hint_unset_esil(RzAnalysis *a, ut64 addr)
Definition: hint.c:303
RZ_API void rz_analysis_hint_set_esil(RzAnalysis *a, ut64 addr, const char *esil)
Definition: hint.c:257
RZ_API void rz_analysis_hint_unset_immbase(RzAnalysis *a, ut64 addr)
Definition: hint.c:315
RZ_API void rz_analysis_hint_unset_bits(RzAnalysis *a, ut64 addr)
Definition: hint.c:367
RZ_API void rz_analysis_hint_unset_ret(RzAnalysis *a, ut64 addr)
Definition: hint.c:331
RZ_API void rz_analysis_hint_unset_high(RzAnalysis *a, ut64 addr)
Definition: hint.c:311
RZ_API void rz_analysis_hint_set_arch(RzAnalysis *a, ut64 addr, RZ_NULLABLE const char *arch)
Definition: hint.c:279
RZ_API void rz_analysis_hint_set_offset(RzAnalysis *a, ut64 addr, const char *typeoff)
Definition: hint.c:203
RZ_API void rz_analysis_hint_set_immbase(RzAnalysis *a, ut64 addr, int base)
Definition: hint.c:229
RZ_API void rz_analysis_hint_set_type(RzAnalysis *a, ut64 addr, int type)
Definition: hint.c:263
RZ_API void rz_analysis_hint_unset_val(RzAnalysis *a, ut64 addr)
Definition: hint.c:351
RZ_API void rz_analysis_hint_unset_pointer(RzAnalysis *a, ut64 addr)
Definition: hint.c:327
RZ_API void rz_analysis_hint_set_pointer(RzAnalysis *a, ut64 addr, ut64 ptr)
Definition: hint.c:237
RZ_API void rz_analysis_hint_set_size(RzAnalysis *a, ut64 addr, ut64 size)
Definition: hint.c:267
RZ_API RzILTraceMemOp * rz_analysis_il_get_mem_op_trace(RzILTraceInstruction *trace, ut64 addr, RzILTraceOpType op_type)
Definition: il_trace.c:135
RZ_API bool rz_analysis_il_mem_trace_contains(RzILTraceInstruction *trace, ut64 addr, RzILTraceOpType op_type)
Definition: il_trace.c:209
RZ_API RzILTraceInstruction * rz_analysis_il_trace_instruction_new(ut64 addr)
Definition: il_trace.c:24
RZ_API bool rz_analysis_il_trace_add_mem(RzILTraceInstruction *trace, RzILTraceMemOp *mem)
Definition: il_trace.c:70
RZ_API bool rz_analysis_il_reg_trace_contains(RzILTraceInstruction *trace, const char *regname, RzILTraceOpType op_type)
Definition: il_trace.c:220
RZ_API void rz_analysis_il_trace_instruction_free(RzILTraceInstruction *instruction)
Definition: il_trace.c:53
RZ_API bool rz_analysis_il_trace_add_reg(RzILTraceInstruction *trace, RzILTraceRegOp *reg)
Definition: il_trace.c:102
RZ_API RzILTraceRegOp * rz_analysis_il_get_reg_op_trace(RzILTraceInstruction *trace, const char *regname, RzILTraceOpType op_type)
Definition: il_trace.c:172
a0
Definition: insn-good.s.cs:704
voidpf void uLong size
Definition: ioapi.h:138
voidpf uLong offset
Definition: ioapi.h:144
const char int mode
Definition: ioapi.h:137
voidpf void * buf
Definition: ioapi.h:138
RZ_API bool rz_analysis_walkthrough_arm_jmptbl_style(RZ_NONNULL RzAnalysis *analysis, RZ_NONNULL RzAnalysisFunction *fcn, RZ_NONNULL RzAnalysisBlock *block, RZ_NONNULL RzAnalysisJmpTableParams *params)
Marks for analysis ARM specific jump table cases.
Definition: jmptbl.c:391
RZ_API bool rz_analysis_get_jmptbl_info(RZ_NONNULL RzAnalysis *analysis, RZ_NONNULL RzAnalysisFunction *fcn, RZ_NONNULL RzAnalysisBlock *block, ut64 jmp_address, RZ_NONNULL RzAnalysisJmpTableParams *params)
Gets some necessary information about a jump table to perform analysis on.
Definition: jmptbl.c:443
RZ_API bool rz_analysis_walkthrough_jmptbl(RZ_NONNULL RzAnalysis *analysis, RZ_NONNULL RzAnalysisFunction *fcn, RZ_NONNULL RzAnalysisBlock *block, RZ_NONNULL RzAnalysisJmpTableParams *params)
Marks the jump table cases for analysis.
Definition: jmptbl.c:176
RZ_API bool rz_analysis_get_delta_jmptbl_info(RZ_NONNULL RzAnalysis *analysis, RZ_NONNULL RzAnalysisFunction *fcn, ut64 jmp_address, ut64 lea_address, RZ_NONNULL RzAnalysisJmpTableParams *params)
Gets some necessary information about a jump table to perform analysis on.
Definition: jmptbl.c:288
RZ_API bool rz_analysis_jmptbl(RzAnalysis *analysis, RzAnalysisFunction *fcn, RzAnalysisBlock *block, ut64 jmpaddr, ut64 table, ut64 tablesize, ut64 default_addr)
Definition: jmptbl.c:46
RZ_API bool rz_analysis_walkthrough_casetbl(RZ_NONNULL RzAnalysis *analysis, RZ_NONNULL RzAnalysisFunction *fcn, RZ_NONNULL RzAnalysisBlock *block, RZ_NONNULL RzAnalysisJmpTableParams *params)
Marks for analysis jump table cases with a space optimization for multiple cases corresponding to the...
Definition: jmptbl.c:76
RZ_API bool rz_analysis_function_delete_label(RzAnalysisFunction *fcn, const char *name)
Definition: labels.c:34
RZ_API const char * rz_analysis_function_get_label_at(RzAnalysisFunction *fcn, ut64 addr)
Definition: labels.c:15
RZ_API ut64 rz_analysis_function_get_label(RzAnalysisFunction *fcn, const char *name)
Definition: labels.c:9
RZ_API bool rz_analysis_function_delete_label_at(RzAnalysisFunction *fcn, ut64 addr)
Definition: labels.c:45
RZ_API bool rz_analysis_function_set_label(RzAnalysisFunction *fcn, const char *name, ut64 addr)
Definition: labels.c:20
#define reg(n)
uint8_t ut8
Definition: lh5801.h:11
void * p
Definition: libc.cpp:67
void * mem
Definition: libc.cpp:91
static RzMain foo[]
Definition: main.c:11
static void list(RzEgg *egg)
Definition: rz-gg.c:52
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
Definition: sflib.h:126
char * dst
Definition: lz4.h:724
RZ_API void rz_meta_set_data_at(RzAnalysis *a, ut64 addr, ut64 wordsz)
Definition: meta.c:307
RZ_API bool rz_meta_set_with_subtype(RzAnalysis *m, RzAnalysisMetaType type, int subtype, ut64 addr, ut64 size, const char *str)
Definition: meta.c:195
RZ_API void rz_meta_space_unset_for(RzAnalysis *a, const RzSpace *space)
Definition: meta.c:274
RZ_API const char * rz_meta_get_string(RzAnalysis *a, RzAnalysisMetaType type, ut64 addr)
Definition: meta.c:146
RZ_API const char * rz_meta_type_to_string(int type)
Definition: meta.c:236
RZ_API ut64 rz_meta_get_size(RzAnalysis *a, RzAnalysisMetaType type)
Definition: meta.c:278
RZ_API void rz_meta_del(RzAnalysis *a, RzAnalysisMetaType type, ut64 addr, ut64 size)
Definition: meta.c:187
RZ_API bool rz_meta_set_string(RzAnalysis *a, RzAnalysisMetaType type, ut64 addr, const char *s)
Definition: meta.c:141
RZ_API int rz_meta_space_count_for(RzAnalysis *a, const RzSpace *space)
Definition: meta.c:295
RZ_API RzPVector * rz_meta_get_all_intersect(RzAnalysis *a, ut64 start, ut64 size, RzAnalysisMetaType type)
Definition: meta.c:227
RZ_API void rz_meta_rebase(RzAnalysis *analysis, ut64 diff)
Definition: meta.c:251
RZ_API RzPVector * rz_meta_get_all_at(RzAnalysis *a, ut64 at)
Definition: meta.c:219
RZ_API bool rz_meta_set(RzAnalysis *a, RzAnalysisMetaType type, ut64 addr, ut64 size, const char *str)
Definition: meta.c:191
RZ_API RzPVector * rz_meta_get_all_in(RzAnalysis *a, ut64 at, RzAnalysisMetaType type)
Definition: meta.c:223
RZ_API RzAnalysisMetaItem * rz_meta_get_at(RzAnalysis *a, ut64 addr, RzAnalysisMetaType type, RZ_OUT RZ_NULLABLE ut64 *size)
Definition: meta.c:207
RZ_API RzIntervalNode * rz_meta_get_in(RzAnalysis *a, ut64 addr, RzAnalysisMetaType type)
Definition: meta.c:215
int n
Definition: mipsasm.c:19
int type
Definition: mipsasm.c:17
int idx
Definition: setup.py:197
description
Definition: setup.py:259
RZ_API int rz_analysis_op_reg_delta(RzAnalysis *analysis, ut64 addr, const char *name)
Definition: op.c:627
const char * name
Definition: op.c:541
RZ_API void rz_analysis_op_free(void *op)
Definition: op.c:61
RZ_API bool rz_analysis_op_fini(RzAnalysisOp *op)
Definition: op.c:37
RZ_API char * rz_analysis_op_to_string(RzAnalysis *analysis, RzAnalysisOp *op)
Definition: op.c:334
RZ_API int rz_analysis_op_hint(RzAnalysisOp *op, RzAnalysisHint *hint)
Definition: op.c:588
RZ_API const char * rz_analysis_optype_to_string(int type)
Definition: op.c:310
int id
Definition: op.c:540
RZ_API bool rz_analysis_op_nonlinear(int t)
Definition: op.c:177
RZ_API int rz_analysis_optype_from_string(RZ_NONNULL const char *name)
Definition: op.c:294
RZ_API RzAnalysisOp * rz_analysis_op_new(void)
Definition: op.c:9
RZ_API void rz_analysis_op_init(RzAnalysisOp *op)
Definition: op.c:23
RZ_API int rz_analysis_op_family_from_string(RZ_NONNULL const char *name)
Definition: op.c:576
RZ_API const char * rz_analysis_stackop_tostring(int s)
Definition: op.c:521
RZ_API int rz_analysis_op(RzAnalysis *analysis, RzAnalysisOp *op, ut64 addr, const ut8 *data, int len, RzAnalysisOpMask mask)
Definition: op.c:96
RZ_API const char * rz_analysis_op_family_to_string(int id)
Definition: op.c:560
RZ_API bool rz_analysis_op_ismemref(int t)
Definition: op.c:208
RZ_API RzList * rz_analysis_op_list_new(void)
Definition: op.c:15
int off
Definition: pal.c:13
RZ_API void rz_analysis_reflines_str_free(RzAnalysisRefStr *refstr)
Definition: reflines.c:483
RZ_API RzList * rz_analysis_reflines_get(RzAnalysis *analysis, ut64 addr, const ut8 *buf, ut64 len, int nlines, int linesout, int linescall)
Definition: reflines.c:82
RZ_API RzAnalysisRefStr * rz_analysis_reflines_str(void *_core, ut64 addr, int opts)
Definition: reflines.c:344
RZ_API int rz_analysis_reflines_middle(RzAnalysis *a, RzList *list, ut64 addr, int len)
Definition: reflines.c:266
#define REP(f, t)
static RzSocket * s
Definition: rtr.c:28
RZ_API char * rz_analysis_rtti_demangle_class_name(RzAnalysis *analysis, const char *name)
Definition: rtti.c:8
RZ_API void rz_analysis_rtti_print_at_vtable(RzAnalysis *analysis, ut64 addr, RzOutputMode mode)
Definition: rtti.c:17
RZ_API void rz_analysis_rtti_print_all(RzAnalysis *analysis, RzOutputMode mode)
Definition: rtti.c:36
RZ_API void rz_analysis_rtti_recover_all(RzAnalysis *analysis)
Definition: rtti.c:87
RZ_API void rz_analysis_rtti_itanium_recover_all(RVTableContext *context, RzList *vtables)
Definition: rtti_itanium.c:860
RZ_API char * rz_analysis_rtti_itanium_demangle_class_name(RVTableContext *context, const char *name)
Definition: rtti_itanium.c:743
RZ_API bool rz_analysis_rtti_itanium_print_at_vtable(RVTableContext *context, ut64 addr, RzOutputMode mode)
Definition: rtti_itanium.c:700
RZ_API void rz_analysis_rtti_msvc_print_base_class_descriptor(RVTableContext *context, ut64 addr, int mode)
Definition: rtti_msvc.c:479
RZ_API void rz_analysis_rtti_msvc_print_type_descriptor(RVTableContext *context, ut64 addr, int mode)
Definition: rtti_msvc.c:437
RZ_API void rz_analysis_rtti_msvc_recover_all(RVTableContext *vt_context, RzList *vtables)
Definition: rtti_msvc.c:966
RZ_API void rz_analysis_rtti_msvc_print_complete_object_locator(RVTableContext *context, ut64 addr, int mode)
Definition: rtti_msvc.c:417
RZ_API char * rz_analysis_rtti_msvc_demangle_class_name(RVTableContext *context, const char *name)
Definition: rtti_msvc.c:393
RZ_API void rz_analysis_rtti_msvc_print_class_hierarchy_descriptor(RVTableContext *context, ut64 addr, int mode)
Definition: rtti_msvc.c:459
RZ_API bool rz_analysis_rtti_msvc_print_at_vtable(RVTableContext *context, ut64 addr, RzOutputMode mode, bool strict)
Definition: rtti_msvc.c:617
RZ_API void rz_analysis_esil_sources_fini(ANALYSIS_ESIL *esil)
struct rz_analysis_esil_basic_block_t RzAnalysisEsilBB
int(* RzAnalysisDiffBBCallback)(RzAnalysis *analysis, RzAnalysisFunction *fcn, RzAnalysisFunction *fcn2)
Definition: rz_analysis.h:1223
RZ_API bool rz_analysis_esil_claim_source(ANALYSIS_ESIL *esil, ut32 src_id)
RZ_LIB_VERSION_HEADER(rz_analysis)
struct rz_analysis_il_init_state_t RzAnalysisILInitState
Description of an initial state of an RzAnalysisILVM.
_RzAnalysisVarScope
Definition: rz_analysis.h:450
@ RZ_ANALYSIS_VAR_SCOPE_LOCAL
Definition: rz_analysis.h:451
RZ_DEPRECATE struct rz_analysis_var_field_t RzAnalysisVarField
struct rz_analysis_esil_source_t RzAnalysisEsilSource
@ RZ_ANALYSIS_ESIL_PARM_NUM
Definition: rz_analysis.h:966
@ RZ_ANALYSIS_ESIL_PARM_INVALID
Definition: rz_analysis.h:964
@ RZ_ANALYSIS_ESIL_PARM_REG
Definition: rz_analysis.h:965
bool(* RzAnalysisEsilOpCb)(RzAnalysisEsil *esil)
Definition: rz_analysis.h:1187
#define ANALYSIS_ESIL
Definition: rz_analysis.h:977
struct rz_analysis_esil_trace_t RzAnalysisEsilTrace
struct rz_analysis_plugin_t RzAnalysisPlugin
bool(* RzAnalysisEsilInterruptCB)(ANALYSIS_ESIL *esil, ut32 interrupt, void *user)
Definition: rz_analysis.h:992
struct rz_analysis_ref_t RzAnalysisXRef
struct rz_analysis_esil_change_mem_t RzAnalysisEsilMemChange
RzAnalysisILStepResult
Definition: rz_analysis.h:1161
@ RZ_ANALYSIS_IL_STEP_IL_RUNTIME_ERROR
Definition: rz_analysis.h:1164
@ RZ_ANALYSIS_IL_STEP_INVALID_OP
Definition: rz_analysis.h:1165
@ RZ_ANALYSIS_IL_STEP_RESULT_SUCCESS
Definition: rz_analysis.h:1162
@ RZ_ANALYSIS_IL_STEP_RESULT_NOT_SET_UP
Definition: rz_analysis.h:1163
RzILOpEffect * RzAnalysisLiftedILOp
Definition: rz_analysis.h:809
struct rz_analysis_var_t RzAnalysisVar
@ RZ_ANALYSIS_FQUALIFIER_VIRTUAL
Definition: rz_analysis.h:186
@ RZ_ANALYSIS_FQUALIFIER_STATIC
Definition: rz_analysis.h:182
@ RZ_ANALYSIS_FQUALIFIER_INLINE
Definition: rz_analysis.h:184
@ RZ_ANALYSIS_FQUALIFIER_VOLATILE
Definition: rz_analysis.h:183
@ RZ_ANALYSIS_FQUALIFIER_NAKED
Definition: rz_analysis.h:185
@ RZ_ANALYSIS_FQUALIFIER_NONE
Definition: rz_analysis.h:181
RzAnalysisBBEndCause
Definition: rz_analysis.h:472
@ RZ_ANALYSIS_RET_BRANCH
Definition: rz_analysis.h:476
@ RZ_ANALYSIS_RET_COND
Definition: rz_analysis.h:477
@ RZ_ANALYSIS_RET_ERROR
Definition: rz_analysis.h:474
@ RZ_ANALYSIS_RET_NOP
Definition: rz_analysis.h:473
@ RZ_ANALYSIS_RET_END
Definition: rz_analysis.h:475
struct rz_analysis_bind_t RzAnalysisBind
struct rz_analysis_il_init_state_var_t RzAnalysisILInitStateVar
Description of the contents of a single IL variable.
@ RZ_ANALYSIS_DIFF_TYPE_MATCH
Definition: rz_analysis.h:206
@ RZ_ANALYSIS_DIFF_TYPE_UNMATCH
Definition: rz_analysis.h:207
@ RZ_ANALYSIS_DIFF_TYPE_NULL
Definition: rz_analysis.h:205
@ RZ_ANALYSIS_FCN_TYPE_INT
Definition: rz_analysis.h:197
@ RZ_ANALYSIS_FCN_TYPE_SYM
Definition: rz_analysis.h:195
@ RZ_ANALYSIS_FCN_TYPE_IMP
Definition: rz_analysis.h:196
@ RZ_ANALYSIS_FCN_TYPE_ANY
Definition: rz_analysis.h:199
@ RZ_ANALYSIS_FCN_TYPE_LOC
Definition: rz_analysis.h:194
@ RZ_ANALYSIS_FCN_TYPE_NULL
Definition: rz_analysis.h:192
@ RZ_ANALYSIS_FCN_TYPE_ROOT
Definition: rz_analysis.h:198
@ RZ_ANALYSIS_FCN_TYPE_FCN
Definition: rz_analysis.h:193
RzAnalysisStackOp
Definition: rz_analysis.h:454
@ RZ_ANALYSIS_STACK_RESET
Definition: rz_analysis.h:460
@ RZ_ANALYSIS_STACK_SET
Definition: rz_analysis.h:459
@ RZ_ANALYSIS_STACK_GET
Definition: rz_analysis.h:458
@ RZ_ANALYSIS_STACK_NULL
Definition: rz_analysis.h:455
@ RZ_ANALYSIS_STACK_ALIGN
Definition: rz_analysis.h:461
@ RZ_ANALYSIS_STACK_INC
Definition: rz_analysis.h:457
@ RZ_ANALYSIS_STACK_NOP
Definition: rz_analysis.h:456
RzAnalysisXRefType
Definition: rz_analysis.h:898
@ RZ_ANALYSIS_XREF_TYPE_CODE
Definition: rz_analysis.h:900
@ RZ_ANALYSIS_XREF_TYPE_NULL
Definition: rz_analysis.h:899
@ RZ_ANALYSIS_XREF_TYPE_STRING
Definition: rz_analysis.h:903
@ RZ_ANALYSIS_XREF_TYPE_CALL
Definition: rz_analysis.h:901
@ RZ_ANALYSIS_XREF_TYPE_DATA
Definition: rz_analysis.h:902
rz_analysis_addr_hint_type_t
Definition: rz_analysis.h:629
@ RZ_ANALYSIS_ADDR_HINT_TYPE_SYNTAX
Definition: rz_analysis.h:639
@ RZ_ANALYSIS_ADDR_HINT_TYPE_PTR
Definition: rz_analysis.h:634
@ RZ_ANALYSIS_ADDR_HINT_TYPE_SIZE
Definition: rz_analysis.h:638
@ RZ_ANALYSIS_ADDR_HINT_TYPE_STACKFRAME
Definition: rz_analysis.h:633
@ RZ_ANALYSIS_ADDR_HINT_TYPE_HIGH
Definition: rz_analysis.h:644
@ RZ_ANALYSIS_ADDR_HINT_TYPE_ESIL
Definition: rz_analysis.h:643
@ RZ_ANALYSIS_ADDR_HINT_TYPE_NEW_BITS
Definition: rz_analysis.h:637
@ RZ_ANALYSIS_ADDR_HINT_TYPE_TYPE_OFFSET
Definition: rz_analysis.h:642
@ RZ_ANALYSIS_ADDR_HINT_TYPE_JUMP
Definition: rz_analysis.h:631
@ RZ_ANALYSIS_ADDR_HINT_TYPE_OPTYPE
Definition: rz_analysis.h:640
@ RZ_ANALYSIS_ADDR_HINT_TYPE_RET
Definition: rz_analysis.h:636
@ RZ_ANALYSIS_ADDR_HINT_TYPE_IMMBASE
Definition: rz_analysis.h:630
@ RZ_ANALYSIS_ADDR_HINT_TYPE_NWORD
Definition: rz_analysis.h:635
@ RZ_ANALYSIS_ADDR_HINT_TYPE_FAIL
Definition: rz_analysis.h:632
@ RZ_ANALYSIS_ADDR_HINT_TYPE_OPCODE
Definition: rz_analysis.h:641
@ RZ_ANALYSIS_ADDR_HINT_TYPE_VAL
Definition: rz_analysis.h:645
RzAnalysisValueType
Definition: rz_analysis.h:766
@ RZ_ANALYSIS_VAL_IMM
Definition: rz_analysis.h:770
@ RZ_ANALYSIS_VAL_REG
Definition: rz_analysis.h:768
@ RZ_ANALYSIS_VAL_MEM
Definition: rz_analysis.h:769
@ RZ_ANALYSIS_VAL_UNK
Definition: rz_analysis.h:767
struct rz_analysis_op_t RzAnalysisOp
struct rz_analysis_task_item RzAnalysisTaskItem
RZ_API const char * rz_analysis_ref_type_tostring(RzAnalysisXRefType t)
Definition: xrefs.c:307
struct rz_analysis_type_var_t RzAnalysisTypeVar
struct rz_analysis_cond_t RzAnalysisCond
struct rz_analysis_type_array_t RzAnalysisTypeArray
struct rz_analysis_type_union_t RzAnalysisTypeUnion
RzAnalysisCPPABI
Definition: rz_analysis.h:541
@ RZ_ANALYSIS_CPP_ABI_ITANIUM
Definition: rz_analysis.h:542
@ RZ_ANALYSIS_CPP_ABI_MSVC
Definition: rz_analysis.h:543
@ RZ_ANALYSIS_TRAP_NONE
Definition: rz_analysis.h:950
@ RZ_ANALYSIS_TRAP_UNHANDLED
Definition: rz_analysis.h:951
@ RZ_ANALYSIS_TRAP_EXEC_ERR
Definition: rz_analysis.h:956
@ RZ_ANALYSIS_TRAP_DIVBYZERO
Definition: rz_analysis.h:953
@ RZ_ANALYSIS_TRAP_HALT
Definition: rz_analysis.h:960
@ RZ_ANALYSIS_TRAP_INVALID
Definition: rz_analysis.h:957
@ RZ_ANALYSIS_TRAP_TODO
Definition: rz_analysis.h:959
@ RZ_ANALYSIS_TRAP_WRITE_ERR
Definition: rz_analysis.h:954
@ RZ_ANALYSIS_TRAP_READ_ERR
Definition: rz_analysis.h:955
@ RZ_ANALYSIS_TRAP_UNALIGNED
Definition: rz_analysis.h:958
@ RZ_ANALYSIS_TRAP_BREAKPOINT
Definition: rz_analysis.h:952
struct rz_analysis_ref_char RzAnalysisRefStr
struct rz_analysis_function_t RzAnalysisFunction
RzAnalysisOpFamily
Definition: rz_analysis.h:310
@ RZ_ANALYSIS_OP_FAMILY_FPU
Definition: rz_analysis.h:313
@ RZ_ANALYSIS_OP_FAMILY_THREAD
Definition: rz_analysis.h:318
@ RZ_ANALYSIS_OP_FAMILY_LAST
Definition: rz_analysis.h:322
@ RZ_ANALYSIS_OP_FAMILY_CRYPTO
Definition: rz_analysis.h:317
@ RZ_ANALYSIS_OP_FAMILY_SSE
Definition: rz_analysis.h:315
@ RZ_ANALYSIS_OP_FAMILY_UNKNOWN
Definition: rz_analysis.h:311
@ RZ_ANALYSIS_OP_FAMILY_PRIV
Definition: rz_analysis.h:316
@ RZ_ANALYSIS_OP_FAMILY_CPU
Definition: rz_analysis.h:312
@ RZ_ANALYSIS_OP_FAMILY_MMX
Definition: rz_analysis.h:314
@ RZ_ANALYSIS_OP_FAMILY_VIRT
Definition: rz_analysis.h:319
@ RZ_ANALYSIS_OP_FAMILY_IO
Definition: rz_analysis.h:321
@ RZ_ANALYSIS_OP_FAMILY_SECURITY
Definition: rz_analysis.h:320
struct rz_analysis_type_alloca_t RzAnalysisTypeAlloca
struct rz_analysis_refline_t RzAnalysisRefline
struct rz_analysis_hint_t RzAnalysisHint
struct rz_analysis_cycle_frame_t RzAnalysisCycleFrame
struct rz_analysis_esil_change_reg_t RzAnalysisEsilRegChange
RzAnalysisHint *(* RzAnalysisGetHint)(RzAnalysis *analysis, ut64 addr)
Definition: rz_analysis.h:692
struct rz_analysis_t RzAnalysis
struct rz_analysis_esil_expr_offset_t RzAnalysisEsilEOffset
struct rz_analysis_callbacks_t RzAnalysisCallbacks
RzAnalysisFunction *(* RzAnalysisGetFcnIn)(RzAnalysis *analysis, ut64 addr, int type)
Definition: rz_analysis.h:691
@ RZ_ANALYSIS_ESIL_OP_TYPE_MATH
Definition: rz_analysis.h:1183
@ RZ_ANALYSIS_ESIL_OP_TYPE_MEM_WRITE
Definition: rz_analysis.h:1181
@ RZ_ANALYSIS_ESIL_OP_TYPE_UNKNOWN
Definition: rz_analysis.h:1178
@ RZ_ANALYSIS_ESIL_OP_TYPE_CONTROL_FLOW
Definition: rz_analysis.h:1179
@ RZ_ANALYSIS_ESIL_OP_TYPE_MEM_READ
Definition: rz_analysis.h:1180
@ RZ_ANALYSIS_ESIL_OP_TYPE_REG_WRITE
Definition: rz_analysis.h:1182
@ RZ_ANALYSIS_ESIL_OP_TYPE_CUSTOM
Definition: rz_analysis.h:1184
int(* RzAnalysisOpCallback)(RzAnalysis *a, RzAnalysisOp *op, ut64 addr, const ut8 *data, int len, RzAnalysisOpMask mask)
Definition: rz_analysis.h:1217
@ RZ_ANALYSIS_DATA_TYPE_INVALID
Definition: rz_analysis.h:78
@ RZ_ANALYSIS_DATA_TYPE_PATTERN
Definition: rz_analysis.h:81
@ RZ_ANALYSIS_DATA_TYPE_UNKNOWN
Definition: rz_analysis.h:73
@ RZ_ANALYSIS_DATA_TYPE_NUMBER
Definition: rz_analysis.h:77
@ RZ_ANALYSIS_DATA_TYPE_STRING
Definition: rz_analysis.h:74
@ RZ_ANALYSIS_DATA_TYPE_WIDE_STRING
Definition: rz_analysis.h:75
@ RZ_ANALYSIS_DATA_TYPE_HEADER
Definition: rz_analysis.h:79
@ RZ_ANALYSIS_DATA_TYPE_POINTER
Definition: rz_analysis.h:76
@ RZ_ANALYSIS_DATA_TYPE_SEQUENCE
Definition: rz_analysis.h:80
@ RZ_ANALYSIS_DATA_TYPE_NULL
Definition: rz_analysis.h:72
struct rz_analysis_options_t RzAnalysisOptions
int(* RzAnalysisEsilCB)(RzAnalysisEsil *esil)
Definition: rz_analysis.h:1227
struct rz_analysis_var_global_t RzAnalysisVarGlobal
Global variables.
RZ_API void rz_analysis_esil_release_source(ANALYSIS_ESIL *esil, ut32 src_id)
int(* RzAnalysisEsilHookRegWriteCB)(ANALYSIS_ESIL *esil, const char *name, ut64 *val)
Definition: rz_analysis.h:1025
RzAnalysisMetaType
Definition: rz_analysis.h:287
@ RZ_META_TYPE_VARTYPE
Definition: rz_analysis.h:297
@ RZ_META_TYPE_ANY
Definition: rz_analysis.h:288
@ RZ_META_TYPE_DATA
Definition: rz_analysis.h:289
@ RZ_META_TYPE_CODE
Definition: rz_analysis.h:290
@ RZ_META_TYPE_HIGHLIGHT
Definition: rz_analysis.h:296
@ RZ_META_TYPE_HIDE
Definition: rz_analysis.h:294
@ RZ_META_TYPE_MAGIC
Definition: rz_analysis.h:293
@ RZ_META_TYPE_STRING
Definition: rz_analysis.h:291
@ RZ_META_TYPE_COMMENT
Definition: rz_analysis.h:295
@ RZ_META_TYPE_FORMAT
Definition: rz_analysis.h:292
struct rz_analysis_cycle_hook_t RzAnalysisCycleHook
bool(* RzAnalysisRegProfCallback)(RzAnalysis *a)
Definition: rz_analysis.h:1219
RzAnalysisEsilTrace RzAnalysisRzilTrace
Definition: rz_analysis.h:1099
struct rz_analysis_bb_t RzAnalysisBlock
struct rz_analysis_case_obj_t RzAnalysisCaseOp
RzAnalysisOpPrefix
Definition: rz_analysis.h:346
@ RZ_ANALYSIS_OP_PREFIX_HWLOOP_END
Definition: rz_analysis.h:353
@ RZ_ANALYSIS_OP_PREFIX_REP
Definition: rz_analysis.h:348
@ RZ_ANALYSIS_OP_PREFIX_UNLIKELY
Definition: rz_analysis.h:352
@ RZ_ANALYSIS_OP_PREFIX_COND
Definition: rz_analysis.h:347
@ RZ_ANALYSIS_OP_PREFIX_LOCK
Definition: rz_analysis.h:350
@ RZ_ANALYSIS_OP_PREFIX_LIKELY
Definition: rz_analysis.h:351
@ RZ_ANALYSIS_OP_PREFIX_REPNE
Definition: rz_analysis.h:349
int(* RzAnalysisFPBBCallback)(RzAnalysis *a, RzAnalysisBlock *bb)
Definition: rz_analysis.h:1221
struct rz_analysis_func_arg_t RzAnalysisFuncArg
RzAnalysisOpDirection
Definition: rz_analysis.h:789
@ RZ_ANALYSIS_OP_DIR_READ
Definition: rz_analysis.h:790
@ RZ_ANALYSIS_OP_DIR_EXEC
Definition: rz_analysis.h:792
@ RZ_ANALYSIS_OP_DIR_WRITE
Definition: rz_analysis.h:791
@ RZ_ANALYSIS_OP_DIR_REF
Definition: rz_analysis.h:793
RzAnalysisEsilMemChange RzAnalysisRzilMemChange
Definition: rz_analysis.h:1096
enum rz_analysis_addr_hint_type_t RzAnalysisAddrHintType
struct rz_analysis_il_config_t RzAnalysisILConfig
Description of the global context of an RzAnalysisILVM.
rz_analysis_data_type_t
Definition: rz_analysis.h:796
@ RZ_ANALYSIS_DATATYPE_FLOAT
Definition: rz_analysis.h:806
@ RZ_ANALYSIS_DATATYPE_INT64
Definition: rz_analysis.h:805
@ RZ_ANALYSIS_DATATYPE_STRING
Definition: rz_analysis.h:800
@ RZ_ANALYSIS_DATATYPE_NULL
Definition: rz_analysis.h:797
@ RZ_ANALYSIS_DATATYPE_INT32
Definition: rz_analysis.h:804
@ RZ_ANALYSIS_DATATYPE_ARRAY
Definition: rz_analysis.h:798
@ RZ_ANALYSIS_DATATYPE_CLASS
Definition: rz_analysis.h:801
@ RZ_ANALYSIS_DATATYPE_BOOLEAN
Definition: rz_analysis.h:802
@ RZ_ANALYSIS_DATATYPE_OBJECT
Definition: rz_analysis.h:799
@ RZ_ANALYSIS_DATATYPE_INT16
Definition: rz_analysis.h:803
RzAnalysisILConfig *(* RzAnalysisILConfigCB)(RzAnalysis *analysis)
Definition: rz_analysis.h:1231
RZ_API ut32 rz_analysis_esil_load_source(ANALYSIS_ESIL *esil, const char *path)
RzAnalysisVarAccessType
Definition: rz_analysis.h:711
@ RZ_ANALYSIS_VAR_ACCESS_TYPE_READ
Definition: rz_analysis.h:713
@ RZ_ANALYSIS_VAR_ACCESS_TYPE_WRITE
Definition: rz_analysis.h:714
@ RZ_ANALYSIS_VAR_ACCESS_TYPE_PTR
Definition: rz_analysis.h:712
struct rz_analysis_esil_interrupt_t RzAnalysisEsilInterrupt
RZ_API void * rz_analysis_esil_get_source(ANALYSIS_ESIL *esil, ut32 src_id)
RzAnalysisOpMask
Definition: rz_analysis.h:439
@ RZ_ANALYSIS_OP_MASK_DISASM
Definition: rz_analysis.h:445
@ RZ_ANALYSIS_OP_MASK_ALL
Definition: rz_analysis.h:447
@ RZ_ANALYSIS_OP_MASK_BASIC
Definition: rz_analysis.h:440
@ RZ_ANALYSIS_OP_MASK_VAL
Definition: rz_analysis.h:442
@ RZ_ANALYSIS_OP_MASK_OPEX
Definition: rz_analysis.h:444
@ RZ_ANALYSIS_OP_MASK_ESIL
Definition: rz_analysis.h:441
@ RZ_ANALYSIS_OP_MASK_HINT
Definition: rz_analysis.h:443
@ RZ_ANALYSIS_OP_MASK_IL
Definition: rz_analysis.h:446
char *(* RzAnalysisRegProfGetCallback)(RzAnalysis *a)
Definition: rz_analysis.h:1220
struct rz_analysis_var_access_t RzAnalysisVarAccess
enum rz_analysis_data_type_t RzAnalysisDataType
@ RZ_ANALYSIS_ESIL_FLAG_SIGN
Definition: rz_analysis.h:945
@ RZ_ANALYSIS_ESIL_FLAG_ZERO
Definition: rz_analysis.h:941
@ RZ_ANALYSIS_ESIL_FLAG_CARRY
Definition: rz_analysis.h:942
@ RZ_ANALYSIS_ESIL_FLAG_OVERFLOW
Definition: rz_analysis.h:943
@ RZ_ANALYSIS_ESIL_FLAG_PARITY
Definition: rz_analysis.h:944
int(* RzAnalysisEsilTrapCB)(RzAnalysisEsil *esil, int trap_type, int trap_code)
Definition: rz_analysis.h:1229
RzAnalysisValueAccess
Definition: rz_analysis.h:760
@ RZ_ANALYSIS_ACC_R
Definition: rz_analysis.h:762
@ RZ_ANALYSIS_ACC_UNKNOWN
Definition: rz_analysis.h:761
@ RZ_ANALYSIS_ACC_W
Definition: rz_analysis.h:763
@ RZ_ANALYSIS_REFLINE_TYPE_MIDDLE_BEFORE
Definition: rz_analysis.h:467
@ RZ_ANALYSIS_REFLINE_TYPE_MIDDLE_AFTER
Definition: rz_analysis.h:469
@ RZ_ANALYSIS_REFLINE_TYPE_WIDE
Definition: rz_analysis.h:466
@ RZ_ANALYSIS_REFLINE_TYPE_UTF8
Definition: rz_analysis.h:465
struct rz_analysis_hint_cb_t RHintCb
struct rz_analysis_meta_item_t RzAnalysisMetaItem
struct rz_analysis_esil_callbacks_t RzAnalysisEsilCallbacks
int(* RzAnalysisDiffFcnCallback)(RzAnalysis *analysis, RzList *fcns, RzList *fcns2)
Definition: rz_analysis.h:1224
struct rz_analysis_fcn_meta_t RzAnalysisFcnMeta
struct rz_analysis_diff_t RzAnalysisDiff
struct rz_analysis_esil_word_t RzAnalysisEsilWord
RzAnalysisEsilBlockEnterType
Definition: rz_analysis.h:1202
@ RZ_ANALYSIS_ESIL_BLOCK_ENTER_FALSE
Definition: rz_analysis.h:1205
@ RZ_ANALYSIS_ESIL_BLOCK_ENTER_TRUE
Definition: rz_analysis.h:1204
@ RZ_ANALYSIS_ESIL_BLOCK_ENTER_NORMAL
Definition: rz_analysis.h:1203
@ RZ_ANALYSIS_ESIL_BLOCK_ENTER_GLUE
Definition: rz_analysis.h:1206
RZ_API void rz_analysis_esil_sources_init(ANALYSIS_ESIL *esil)
RzAnalysisVarKind
Definition: rz_analysis.h:702
@ RZ_ANALYSIS_VAR_KIND_REG
Definition: rz_analysis.h:703
@ RZ_ANALYSIS_VAR_KIND_SPV
Definition: rz_analysis.h:705
@ RZ_ANALYSIS_VAR_KIND_BPV
Definition: rz_analysis.h:704
struct rz_analysis_esil_operation_t RzAnalysisEsilOp
int(* RzAnalysisEsilLoopCB)(RzAnalysisEsil *esil, RzAnalysisOp *op)
Definition: rz_analysis.h:1228
_RzAnalysisOpType
Definition: rz_analysis.h:360
@ RZ_ANALYSIS_OP_TYPE_CMP
Definition: rz_analysis.h:399
@ RZ_ANALYSIS_OP_TYPE_SUB
Definition: rz_analysis.h:402
@ RZ_ANALYSIS_OP_TYPE_ICALL
Definition: rz_analysis.h:381
@ RZ_ANALYSIS_OP_TYPE_LOAD
Definition: rz_analysis.h:416
@ RZ_ANALYSIS_OP_TYPE_CRYPTO
Definition: rz_analysis.h:430
@ RZ_ANALYSIS_OP_TYPE_UNK
Definition: rz_analysis.h:388
@ RZ_ANALYSIS_OP_TYPE_MUL
Definition: rz_analysis.h:404
@ RZ_ANALYSIS_OP_TYPE_ROL
Definition: rz_analysis.h:420
@ RZ_ANALYSIS_OP_TYPE_CASE
Definition: rz_analysis.h:424
@ RZ_ANALYSIS_OP_TYPE_JMP
Definition: rz_analysis.h:368
@ RZ_ANALYSIS_OP_TYPE_REP
Definition: rz_analysis.h:363
@ RZ_ANALYSIS_OP_TYPE_AND
Definition: rz_analysis.h:411
@ RZ_ANALYSIS_OP_TYPE_SAL
Definition: rz_analysis.h:408
@ RZ_ANALYSIS_OP_TYPE_SYNC
Definition: rz_analysis.h:431
@ RZ_ANALYSIS_OP_TYPE_MOD
Definition: rz_analysis.h:422
@ RZ_ANALYSIS_OP_TYPE_UPUSH
Definition: rz_analysis.h:395
@ RZ_ANALYSIS_OP_TYPE_RPUSH
Definition: rz_analysis.h:396
@ RZ_ANALYSIS_OP_TYPE_UJMP
Definition: rz_analysis.h:369
@ RZ_ANALYSIS_OP_TYPE_NOR
Definition: rz_analysis.h:413
@ RZ_ANALYSIS_OP_TYPE_IJMP
Definition: rz_analysis.h:371
@ RZ_ANALYSIS_OP_TYPE_IO
Definition: rz_analysis.h:403
@ RZ_ANALYSIS_OP_TYPE_UCCALL
Definition: rz_analysis.h:384
@ RZ_ANALYSIS_OP_TYPE_MJMP
Definition: rz_analysis.h:375
@ RZ_ANALYSIS_OP_TYPE_ROR
Definition: rz_analysis.h:419
@ RZ_ANALYSIS_OP_TYPE_SWI
Definition: rz_analysis.h:393
@ RZ_ANALYSIS_OP_TYPE_SAR
Definition: rz_analysis.h:409
@ RZ_ANALYSIS_OP_TYPE_ABS
Definition: rz_analysis.h:428
@ RZ_ANALYSIS_OP_TYPE_IND
Definition: rz_analysis.h:366
@ RZ_ANALYSIS_OP_TYPE_NULL
Definition: rz_analysis.h:367
@ RZ_ANALYSIS_OP_TYPE_CMOV
Definition: rz_analysis.h:391
@ RZ_ANALYSIS_OP_TYPE_LEAVE
Definition: rz_analysis.h:418
@ RZ_ANALYSIS_OP_TYPE_TRAP
Definition: rz_analysis.h:392
@ RZ_ANALYSIS_OP_TYPE_XCHG
Definition: rz_analysis.h:421
@ RZ_ANALYSIS_OP_TYPE_MEM
Definition: rz_analysis.h:364
@ RZ_ANALYSIS_OP_TYPE_CCALL
Definition: rz_analysis.h:383
@ RZ_ANALYSIS_OP_TYPE_CALL
Definition: rz_analysis.h:378
@ RZ_ANALYSIS_OP_TYPE_ADD
Definition: rz_analysis.h:401
@ RZ_ANALYSIS_OP_TYPE_SWITCH
Definition: rz_analysis.h:423
@ RZ_ANALYSIS_OP_TYPE_OR
Definition: rz_analysis.h:410
@ RZ_ANALYSIS_OP_TYPE_STORE
Definition: rz_analysis.h:415
@ RZ_ANALYSIS_OP_TYPE_CPL
Definition: rz_analysis.h:429
@ RZ_ANALYSIS_OP_TYPE_REG
Definition: rz_analysis.h:365
@ RZ_ANALYSIS_OP_TYPE_RCJMP
Definition: rz_analysis.h:374
@ RZ_ANALYSIS_OP_TYPE_CRET
Definition: rz_analysis.h:386
@ RZ_ANALYSIS_OP_TYPE_PUSH
Definition: rz_analysis.h:397
@ RZ_ANALYSIS_OP_TYPE_SHR
Definition: rz_analysis.h:406
@ RZ_ANALYSIS_OP_TYPE_IRJMP
Definition: rz_analysis.h:372
@ RZ_ANALYSIS_OP_TYPE_POP
Definition: rz_analysis.h:398
@ RZ_ANALYSIS_OP_TYPE_RJMP
Definition: rz_analysis.h:370
@ RZ_ANALYSIS_OP_TYPE_CJMP
Definition: rz_analysis.h:373
@ RZ_ANALYSIS_OP_TYPE_DIV
Definition: rz_analysis.h:405
@ RZ_ANALYSIS_OP_TYPE_CSWI
Definition: rz_analysis.h:394
@ RZ_ANALYSIS_OP_TYPE_COND
Definition: rz_analysis.h:361
@ RZ_ANALYSIS_OP_TYPE_CAST
Definition: rz_analysis.h:426
@ RZ_ANALYSIS_OP_TYPE_UCJMP
Definition: rz_analysis.h:377
@ RZ_ANALYSIS_OP_TYPE_MOV
Definition: rz_analysis.h:390
@ RZ_ANALYSIS_OP_TYPE_SHL
Definition: rz_analysis.h:407
@ RZ_ANALYSIS_OP_TYPE_ILL
Definition: rz_analysis.h:387
@ RZ_ANALYSIS_OP_TYPE_UCALL
Definition: rz_analysis.h:379
@ RZ_ANALYSIS_OP_TYPE_NOT
Definition: rz_analysis.h:414
@ RZ_ANALYSIS_OP_TYPE_RET
Definition: rz_analysis.h:385
@ RZ_ANALYSIS_OP_TYPE_NOP
Definition: rz_analysis.h:389
@ RZ_ANALYSIS_OP_TYPE_ACMP
Definition: rz_analysis.h:400
@ RZ_ANALYSIS_OP_TYPE_LEA
Definition: rz_analysis.h:417
@ RZ_ANALYSIS_OP_TYPE_RCALL
Definition: rz_analysis.h:380
@ RZ_ANALYSIS_OP_TYPE_XOR
Definition: rz_analysis.h:412
@ RZ_ANALYSIS_OP_TYPE_NEW
Definition: rz_analysis.h:427
@ RZ_ANALYSIS_OP_TYPE_LENGTH
Definition: rz_analysis.h:425
@ RZ_ANALYSIS_OP_TYPE_MCJMP
Definition: rz_analysis.h:376
@ RZ_ANALYSIS_OP_TYPE_IRCALL
Definition: rz_analysis.h:382
int(* RzAnalysisDiffEvalCallback)(RzAnalysis *analysis)
Definition: rz_analysis.h:1225
struct rz_analysis_type_ptr_t RzAnalysisTypePtr
struct rz_analysis_esil_t RzAnalysisEsil
struct rz_analysis_esil_interrupt_handler_t RzAnalysisEsilInterruptHandler
struct rz_analysis_dwarf_context RzAnalysisDwarfContext
int(* RzAnalysisFPFcnCallback)(RzAnalysis *a, RzAnalysisFunction *fcn)
Definition: rz_analysis.h:1222
RzAnalysisEsilRegChange RzAnalysisRzilRegChange
Definition: rz_analysis.h:1095
struct rz_analysis_value_t RzAnalysisValue
struct rz_analysis_range_t RzAnalysisRange
struct rz_analysis_switch_obj_t RzAnalysisSwitchOp
struct rz_analysis_addr_hint_record_t RzAnalysisAddrHintRecord
RzFlagItem *(* RzFlagSet)(RzFlag *f, const char *name, ut64 addr, ut32 size)
Definition: rz_flag.h:65
RzFlagItem *(* RzFlagGetAtAddr)(RzFlag *f, ut64)
Definition: rz_flag.h:61
RzFlagItem *(* RzFlagGet)(RzFlag *f, const char *name)
Definition: rz_flag.h:60
int(* RzListComparator)(const void *value, const void *list_data)
Definition: rz_list.h:33
@ RZ_REG_TYPE_LAST
Definition: rz_reg.h:34
RzTypeCond
Type Conditions.
Definition: rz_type.h:182
#define RZ_NULLABLE
Definition: rz_types.h:65
#define RZ_OWN
Definition: rz_types.h:62
#define RZ_OUT
Definition: rz_types.h:51
#define RZ_NONNULL
Definition: rz_types.h:64
RzOutputMode
Enum to describe the way data are printed.
Definition: rz_types.h:38
#define RZ_BORROW
Definition: rz_types.h:63
#define RZ_DEPRECATE
Definition: rz_types.h:66
#define st64
Definition: rz_types_base.h:10
bool(* SdbForeachCallback)(void *user, const char *k, const char *v)
Definition: sdb.h:115
RZ_API bool rz_serialize_analysis_load(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis, RZ_NULLABLE RzSerializeResultInfo *res)
RZ_API RZ_NULLABLE RzAnalysisVar * rz_serialize_analysis_var_load(RZ_NONNULL RzAnalysisFunction *fcn, RZ_NONNULL RzSerializeAnalVarParser parser, RZ_NONNULL const RzJson *json)
RZ_API void rz_serialize_analysis_case_op_save(RZ_NONNULL PJ *j, RZ_NONNULL RzAnalysisCaseOp *op)
RZ_API bool rz_serialize_analysis_hints_load(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis, RZ_NULLABLE RzSerializeResultInfo *res)
RZ_API bool rz_serialize_analysis_cc_load(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis, RZ_NULLABLE RzSerializeResultInfo *res)
RZ_API void rz_serialize_analysis_imports_save(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis)
RZ_API RzAnalysisSwitchOp * rz_serialize_analysis_switch_op_load(RZ_NONNULL const RzJson *json)
RZ_API bool rz_serialize_analysis_blocks_load(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis, RzSerializeAnalDiffParser diff_parser, RZ_NULLABLE RzSerializeResultInfo *res)
RZ_API bool rz_serialize_analysis_imports_load(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis, RZ_NULLABLE RzSerializeResultInfo *res)
RZ_API void rz_serialize_analysis_diff_save(RZ_NONNULL PJ *j, RZ_NONNULL RzAnalysisDiff *diff)
RZ_API void rz_serialize_analysis_hints_save(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis)
RZ_API bool rz_serialize_analysis_global_var_load(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis, RZ_NULLABLE RzSerializeResultInfo *res)
RZ_API void rz_serialize_analysis_global_var_save(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *anal)
RZ_API void rz_serialize_analysis_switch_op_save(RZ_NONNULL PJ *j, RZ_NONNULL RzAnalysisSwitchOp *op)
RZ_API void rz_serialize_analysis_classes_save(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis)
RZ_API void rz_serialize_analysis_function_noreturn_save(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis)
RZ_API RzSerializeAnalDiffParser rz_serialize_analysis_diff_parser_new(void)
RZ_API RZ_NULLABLE RzAnalysisDiff * rz_serialize_analysis_diff_load(RZ_NONNULL RzSerializeAnalDiffParser parser, RZ_NONNULL const RzJson *json)
RZ_API RzSerializeAnalVarParser rz_serialize_analysis_var_parser_new(void)
RZ_API void rz_serialize_analysis_functions_save(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis)
RZ_API void rz_serialize_analysis_save(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis)
RZ_API void rz_serialize_analysis_var_parser_free(RzSerializeAnalVarParser parser)
RZ_API RzSerializeAnalGlobalVarParser rz_serialize_analysis_global_var_parser_new(void)
RZ_API bool rz_serialize_analysis_classes_load(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis, RZ_NULLABLE RzSerializeResultInfo *res)
RZ_API bool rz_serialize_analysis_types_load(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis, RZ_NULLABLE RzSerializeResultInfo *res)
RZ_API void rz_serialize_analysis_diff_parser_free(RzSerializeAnalDiffParser parser)
RZ_API void rz_serialize_analysis_types_save(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis)
RZ_API bool rz_serialize_analysis_xrefs_load(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis, RZ_NULLABLE RzSerializeResultInfo *res)
RZ_API void rz_serialize_analysis_global_var_parser_free(RzSerializeAnalGlobalVarParser parser)
RZ_API bool rz_serialize_analysis_functions_load(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis, RzSerializeAnalDiffParser diff_parser, RZ_NULLABLE RzSerializeResultInfo *res)
RZ_API void rz_serialize_analysis_cc_save(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis)
RZ_API bool rz_serialize_analysis_meta_load(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis, RZ_NULLABLE RzSerializeResultInfo *res)
RZ_API bool rz_serialize_analysis_function_noreturn_load(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis, RZ_NULLABLE RzSerializeResultInfo *res)
RZ_API void rz_serialize_analysis_xrefs_save(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis)
RZ_API void rz_serialize_analysis_blocks_save(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis)
RZ_API void rz_serialize_analysis_meta_save(RZ_NONNULL Sdb *db, RZ_NONNULL RzAnalysis *analysis)
HtUP SetU
Definition: set.h:22
static struct sockaddr static addrlen static backlog const void static flags void struct sockaddr from
Definition: sfsocketcall.h:123
static struct sockaddr static addrlen static backlog const void static flags void struct sockaddr socklen_t static fromlen const void const struct sockaddr to
Definition: sfsocketcall.h:125
static struct sockaddr static addrlen static backlog const void static flags void flags
Definition: sfsocketcall.h:123
static int
Definition: sfsocketcall.h:114
static struct sockaddr static addrlen static backlog const void msg
Definition: sfsocketcall.h:119
#define d(i)
Definition: sha256.c:44
#define b(i)
Definition: sha256.c:42
#define f(i)
Definition: sha256.c:46
#define c(i)
Definition: sha256.c:43
#define a(i)
Definition: sha256.c:41
#define h(i)
Definition: sha256.c:48
#define cond(bop, top, mask, flags)
SdbForeachCallback cb
Definition: rz_analysis.h:56
struct rz_analysis_t * analysis
Definition: rz_analysis.h:53
struct rz_analysis_function_t * fcn
Definition: rz_analysis.h:59
Definition: inftree9.h:24
Definition: dis.h:35
Definition: gzlog.c:289
Definition: ls.h:22
Definition: z80asm.h:102
Definition: rz_pj.h:12
RzAnalysisAddrHintType type
Definition: rz_analysis.h:649
RzAnalysisAttr * next
Definition: rz_analysis.h:223
ut8 * parent_reg_arena
Definition: rz_analysis.h:877
RzAnalysis * analysis
Definition: rz_analysis.h:887
RzAnalysisCond * cond
Definition: rz_analysis.h:873
const char * cmpreg
Definition: rz_analysis.h:883
RzAnalysisSwitchOp * switch_op
Definition: rz_analysis.h:874
RzAnalysisDiff * diff
Definition: rz_analysis.h:872
RzAnalysis * analysis
Definition: rz_analysis.h:695
RzAnalysisGetFcnIn get_fcn_in
Definition: rz_analysis.h:696
RzAnalysisGetHint get_hint
Definition: rz_analysis.h:697
int(* on_fcn_delete)(struct rz_analysis_t *, void *user, RzAnalysisFunction *fcn)
Definition: rz_analysis.h:499
int(* on_fcn_rename)(struct rz_analysis_t *, void *user, RzAnalysisFunction *fcn, const char *oldname)
Definition: rz_analysis.h:500
int(* on_fcn_bb_new)(struct rz_analysis_t *, void *user, RzAnalysisFunction *fcn, struct rz_analysis_bb_t *bb)
Definition: rz_analysis.h:501
int(* on_fcn_new)(struct rz_analysis_t *, void *user, RzAnalysisFunction *fcn)
Definition: rz_analysis.h:498
struct rz_analysis_cycle_frame_t * prev
Definition: rz_analysis.h:926
const RzBinDwarfDebugInfo * info
Definition: rz_analysis.h:39
RzAnalysisEsilBlockEnterType enter
Definition: rz_analysis.h:1213
RzAnalysisEsilEOffset first
Definition: rz_analysis.h:1210
RzAnalysisEsilEOffset last
Definition: rz_analysis.h:1211
int(* mem_write)(ANALYSIS_ESIL *esil, ut64 addr, const ut8 *buf, int len)
Definition: rz_analysis.h:1035
int(* hook_mem_read)(ANALYSIS_ESIL *esil, ut64 addr, ut8 *buf, int len)
Definition: rz_analysis.h:1032
int(* mem_read)(ANALYSIS_ESIL *esil, ut64 addr, ut8 *buf, int len)
Definition: rz_analysis.h:1033
int(* hook_command)(ANALYSIS_ESIL *esil, const char *op)
Definition: rz_analysis.h:1031
int(* reg_read)(ANALYSIS_ESIL *esil, const char *name, ut64 *res, int *size)
Definition: rz_analysis.h:1037
int(* hook_reg_read)(ANALYSIS_ESIL *esil, const char *name, ut64 *res, int *size)
Definition: rz_analysis.h:1036
int(* hook_mem_write)(ANALYSIS_ESIL *esil, ut64 addr, const ut8 *buf, int len)
Definition: rz_analysis.h:1034
int(* reg_write)(ANALYSIS_ESIL *esil, const char *name, ut64 val)
Definition: rz_analysis.h:1039
int(* hook_flag_read)(ANALYSIS_ESIL *esil, const char *flag, ut64 *num)
Definition: rz_analysis.h:1030
RzAnalysisEsilHookRegWriteCB hook_reg_write
Definition: rz_analysis.h:1038
RzAnalysisEsilInterruptCB cb
Definition: rz_analysis.h:998
RzAnalysisEsilInterruptHandler * handler
Definition: rz_analysis.h:1171
RzAnalysisEsilOpCb code
Definition: rz_analysis.h:1190
RzAnalysis * analysis
Definition: rz_analysis.h:1043
RzAnalysisEsilCallbacks cb
Definition: rz_analysis.h:1078
RzAnalysisEsilTrace * trace
Definition: rz_analysis.h:1077
bool(* cmd)(ANALYSIS_ESIL *esil, const char *name, ut64 a0, ut64 a1)
Definition: rz_analysis.h:1089
RzStrBuf current_opstr
Definition: rz_analysis.h:1072
RzIDStorage * sources
Definition: rz_analysis.h:1073
RzRegArena * arena[RZ_REG_TYPE_LAST]
Definition: rz_analysis.h:1017
const char * cc_source
Definition: rz_analysis.h:273
RzAnalysisFcnMeta meta
Definition: rz_analysis.h:265
RzAnalysisDiff * diff
Definition: rz_analysis.h:263
struct rz_analysis_t * analysis
Definition: rz_analysis.h:267
void(* on_bits)(struct rz_analysis_t *a, ut64 addr, int bits, bool set)
Definition: rz_analysis.h:548
Description of the global context of an RzAnalysisILVM.
Definition: rz_analysis.h:1134
ut32 pc_size
size of the program counter in bits
Definition: rz_analysis.h:1135
RZ_NULLABLE RzAnalysisILInitState * init_state
optional, initial contents for variables/registers, etc.
Definition: rz_analysis.h:1144
RzPVector labels
global labels, primarily for syscall/hook callbacks
Definition: rz_analysis.h:1143
ut32 mem_key_size
address size for memory 0, bound against IO
Definition: rz_analysis.h:1142
RZ_NULLABLE const char ** reg_bindings
Definition: rz_analysis.h:1141
Description of an initial state of an RzAnalysisILVM.
Definition: rz_analysis.h:1117
RzVector vars
Contents of global variables.
Definition: rz_analysis.h:1118
Description of the contents of a single IL variable.
Definition: rz_analysis.h:1104
RZ_NONNULL const char * name
Definition: rz_analysis.h:1105
RZ_NONNULL RzILVal * val
Definition: rz_analysis.h:1106
High-level RzIL vm to emulate disassembled code.
Definition: rz_analysis.h:1155
RZ_NONNULL RzILRegBinding * reg_binding
specifies which (global) variables are bound to registers
Definition: rz_analysis.h:1158
RZ_NONNULL RzILVM * vm
low-level vm to execute IL code
Definition: rz_analysis.h:1156
RZ_NONNULL RzBuffer * io_buf
buffer to use for memory 0 (io)
Definition: rz_analysis.h:1157
const RzSpace * space
Definition: rz_analysis.h:306
RzAnalysisMetaType type
Definition: rz_analysis.h:302
RzAnalysisOpFamily family
Definition: rz_analysis.h:823
RzAnalysisValue analysis_vals[6]
Definition: rz_analysis.h:834
RzAnalysisValue * dst
Definition: rz_analysis.h:840
RzAnalysisHint hint
Definition: rz_analysis.h:850
RzAnalysisSwitchOp * switch_op
Definition: rz_analysis.h:849
RzAnalysisStackOp stackop
Definition: rz_analysis.h:817
RzAnalysisOpPrefix prefix
Definition: rz_analysis.h:815
RzTypeCond cond
Definition: rz_analysis.h:818
RzAnalysisLiftedILOp il_op
Definition: rz_analysis.h:844
RzAnalysisDataType datatype
Definition: rz_analysis.h:851
RzAnalysisValue * src[3]
Definition: rz_analysis.h:839
const char * reg
Definition: rz_analysis.h:845
RzAnalysisOpDirection direction
Definition: rz_analysis.h:831
const char * ireg
Definition: rz_analysis.h:846
RzAnalysisRegProfGetCallback get_reg_profile
Definition: rz_analysis.h:1259
RzAnalysisEsilCB esil_fini
Definition: rz_analysis.h:1269
RzAnalysisEsilTrapCB esil_trap
Definition: rz_analysis.h:1268
bool(* init)(void **user)
Definition: rz_analysis.h:1243
RzAnalysisDiffEvalCallback diff_eval
Definition: rz_analysis.h:1264
RzAnalysisFPBBCallback fingerprint_bb
Definition: rz_analysis.h:1260
const char * version
Definition: rz_analysis.h:1239
RzAnalysisEsilCB esil_init
Definition: rz_analysis.h:1266
int(* address_bits)(RzAnalysis *analysis, int bits)
Definition: rz_analysis.h:1254
RzAnalysisDiffFcnCallback diff_fcn
Definition: rz_analysis.h:1263
bool(* fini)(void *user)
Definition: rz_analysis.h:1244
RzAnalysisEsilLoopCB esil_post_loop
Definition: rz_analysis.h:1267
const char * license
Definition: rz_analysis.h:1236
RzAnalysisOpCallback op
Definition: rz_analysis.h:1257
RzAnalysisDiffBBCallback diff_bb
Definition: rz_analysis.h:1262
const char * author
Definition: rz_analysis.h:1238
RzAnalysisFPFcnCallback fingerprint_fcn
Definition: rz_analysis.h:1261
RzAnalysisILConfigCB il_config
return an IL config to execute lifted code of the given analysis' arch/cpu/bits
Definition: rz_analysis.h:1270
int(* archinfo)(RzAnalysis *analysis, int query)
Definition: rz_analysis.h:1246
RzAnalysisXRefType type
Definition: rz_analysis.h:909
RzFlagSet flg_class_set
Definition: rz_analysis.h:576
RzList * reflines
Definition: rz_analysis.h:609
RzAnalysisRange * limit
Definition: rz_analysis.h:587
RBTree bb_tree
Definition: rz_analysis.h:564
RzListComparator columnSort
Definition: rz_analysis.h:611
RzAnalysisCallbacks cb
Definition: rz_analysis.h:607
RzPlatformTarget * arch_target
Definition: rz_analysis.h:622
RzAnalysisCPPABI cpp_abi
Definition: rz_analysis.h:560
RzFlagGetAtAddr flag_get
Definition: rz_analysis.h:616
RzStrConstPool constpool
Definition: rz_analysis.h:620
bool(* read_at)(struct rz_analysis_t *analysis, ut64 addr, ut8 *buf, int len)
Definition: rz_analysis.h:614
HtUP * addr_hints
Definition: rz_analysis.h:596
RzEvent * ev
Definition: rz_analysis.h:617
RzList * leaddrs
Definition: rz_analysis.h:621
double diff_thfcn
Definition: rz_analysis.h:573
void * plugin_data
Definition: rz_analysis.h:561
RzList * fcns
Definition: rz_analysis.h:565
HtUP * ht_addr_fun
Definition: rz_analysis.h:566
RBTree bits_hints
Definition: rz_analysis.h:598
HtPP * ht_name_fun
Definition: rz_analysis.h:567
HtPP * ht_global_var
Definition: rz_analysis.h:624
bool recursive_noreturn
Definition: rz_analysis.h:593
HtUP * ht_xrefs_to
Definition: rz_analysis.h:592
struct rz_analysis_plugin_t * cur
Definition: rz_analysis.h:586
RzIntervalTree meta
Definition: rz_analysis.h:600
RBTree arch_hints
Definition: rz_analysis.h:597
RzBinBind binb
Definition: rz_analysis.h:579
struct rz_analysis_esil_t * esil
Definition: rz_analysis.h:584
HtUP * type_links
Definition: rz_analysis.h:603
RzFlagGet flg_class_get
Definition: rz_analysis.h:577
RHintCb hint_cbs
Definition: rz_analysis.h:599
RzSpaces meta_spaces
Definition: rz_analysis.h:601
ut8 * last_disasm_reg
Definition: rz_analysis.h:569
Sdb * sdb_classes_attrs
Definition: rz_analysis.h:606
RzHash * hash
Definition: rz_analysis.h:626
RzSyscall * syscall
Definition: rz_analysis.h:570
HtUP * ht_xrefs_from
Definition: rz_analysis.h:591
RzFlagBind flb
Definition: rz_analysis.h:575
RzPlatformTargetIndex * platform_target
Definition: rz_analysis.h:623
double diff_thbb
Definition: rz_analysis.h:572
RzAnalysisOptions opt
Definition: rz_analysis.h:608
SetU * visited
Definition: rz_analysis.h:619
RzAnalysisILVM * il_vm
user-faced VM, NEVER use this for any analysis passes!
Definition: rz_analysis.h:585
RzList * imports
Definition: rz_analysis.h:618
RzList * plugins
Definition: rz_analysis.h:588
Sdb * sdb_classes
Definition: rz_analysis.h:605
RzIOBind iob
Definition: rz_analysis.h:574
RzTypeDB * typedb
Definition: rz_analysis.h:602
RzFlagSet flg_fcn_set
Definition: rz_analysis.h:578
RzCoreBind coreb
Definition: rz_analysis.h:580
RBTree global_var_tree
Definition: rz_analysis.h:625
RzAnalysisBlock * block
Definition: rz_analysis.h:893
RzAnalysisFunction * fcn
Definition: rz_analysis.h:892
RzAnalysisType * items
Definition: rz_analysis.h:177
union rz_analysis_type_array_t::@244 value
union rz_analysis_type_ptr_t::@243 value
RzAnalysisType * items
Definition: rz_analysis.h:162
RzAnalysisType * items
Definition: rz_analysis.h:170
union rz_analysis_type_var_t::@242 value
RzAnalysisValueAccess access
Definition: rz_analysis.h:776
RzAnalysisValueType type
Definition: rz_analysis.h:775
RzRegItem * regdelta
Definition: rz_analysis.h:785
Global variables.
Definition: rz_analysis.h:744
RZ_BORROW RzAnalysis * analysis
analysis pertaining to this global variable
Definition: rz_analysis.h:750
RzType * type
type of the variable
Definition: rz_analysis.h:748
ut64 addr
address of the global variable
Definition: rz_analysis.h:747
RBNode rb
RBTree node for address management.
Definition: rz_analysis.h:745
char * name
name of the variable
Definition: rz_analysis.h:746
RzAnalysisVarKind kind
Definition: rz_analysis.h:728
RzAnalysisFunction * fcn
Definition: rz_analysis.h:726
RzVector constraints
Definition: rz_analysis.h:734
Low-level VM to execute raw IL code.
Definition: rz_il_vm.h:37
type constrained by the type conditions
Definition: rz_type.h:209
Definition: sdb.h:63
Definition: dis.h:43
void on_exit(uv_process_t *req, int64_t exit_status, int term_signal)
Definition: main.c:11
uint64_t blocks
Definition: list.c:104
RZ_API void rz_analysis_switch_op_free(RzAnalysisSwitchOp *swop)
Definition: switch.c:42
RZ_API RzAnalysisSwitchOp * rz_analysis_switch_op_new(ut64 addr, ut64 min_val, ut64 max_val, ut64 def_val)
Definition: switch.c:21
RZ_API RzAnalysisCaseOp * rz_analysis_switch_op_add_case(RzAnalysisSwitchOp *swop, ut64 addr, ut64 value, ut64 jump)
Definition: switch.c:49
#define bool
Definition: sysdefs.h:146
#define fail(test)
Definition: tests.h:29
RZ_API void rz_parse_pdb_types(const RzTypeDB *typedb, const RzPdb *pdb)
Saves PDB types from TPI stream into the type database.
Definition: type_pdb.c:802
Definition: dis.c:32
void error(const char *msg)
Definition: untgz.c:593
RZ_API RZ_OWN char * rz_analysis_function_autoname_var(RzAnalysisFunction *fcn, char kind, const char *pfx, int ptr)
Definition: var.c:633
RZ_API void rz_analysis_var_clear_accesses(RzAnalysisVar *var)
Definition: var.c:492
RZ_API void rz_analysis_extract_rarg(RzAnalysis *analysis, RzAnalysisOp *op, RzAnalysisFunction *fcn, int *reg_set, int *count)
Definition: var.c:909
RZ_API void rz_analysis_fcn_vars_cache_fini(RzAnalysisFcnVarsCache *cache)
Definition: var.c:1223
RZ_API void rz_analysis_var_resolve_overlaps(RzAnalysisVar *var)
Definition: var.c:77
RZ_API void rz_analysis_function_delete_unused_vars(RzAnalysisFunction *fcn)
Definition: var.c:229
RZ_API RZ_BORROW RzAnalysisVar * rz_analysis_function_get_var(RzAnalysisFunction *fcn, char kind, int delta)
Definition: var.c:259
RZ_API void rz_analysis_function_delete_all_vars(RzAnalysisFunction *fcn)
Definition: var.c:220
RZ_API int rz_analysis_var_count(RzAnalysis *a, RzAnalysisFunction *fcn, int kind, int type)
Definition: var.c:574
RZ_API void rz_analysis_extract_vars(RzAnalysis *analysis, RzAnalysisFunction *fcn, RzAnalysisOp *op)
Definition: var.c:1103
RZ_API ut64 rz_analysis_var_addr(RzAnalysisVar *var)
Definition: var.c:270
RZ_API void rz_analysis_var_set_access(RzAnalysisVar *var, const char *reg, ut64 access_addr, int access_type, st64 stackptr)
Definition: var.c:441
RZ_API bool rz_analysis_function_rebase_vars(RzAnalysis *a, RzAnalysisFunction *fcn)
Definition: var.c:44
RZ_API RzList * rz_analysis_var_list(RzAnalysis *a, RzAnalysisFunction *fcn, int kind)
Definition: var.c:1154
RZ_API void rz_analysis_var_remove_access_at(RzAnalysisVar *var, ut64 address)
Definition: var.c:476
RZ_API char * rz_analysis_var_get_constraints_readable(RzAnalysisVar *var)
Definition: var.c:528
RZ_API void rz_analysis_function_delete_vars_by_kind(RzAnalysisFunction *fcn, RzAnalysisVarKind kind)
Definition: var.c:206
RZ_API RZ_BORROW RzPVector * rz_analysis_function_get_vars_used_at(RzAnalysisFunction *fcn, ut64 op_addr)
Definition: var.c:393
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)
Definition: var.c:111
RZ_DEPRECATE RZ_API RzList * rz_analysis_var_all_list(RzAnalysis *analysis, RzAnalysisFunction *fcn)
Definition: var.c:1135
RZ_API void rz_analysis_var_add_constraint(RzAnalysisVar *var, RZ_BORROW RzTypeConstraint *constraint)
Definition: var.c:524
RZ_API st64 rz_analysis_function_get_var_stackptr_at(RzAnalysisFunction *fcn, st64 delta, ut64 addr)
Definition: var.c:284
RZ_API char * rz_analysis_fcn_format_sig(RZ_NONNULL RzAnalysis *analysis, RZ_NONNULL RzAnalysisFunction *fcn, RZ_NULLABLE char *fcn_name, RZ_NULLABLE RzAnalysisFcnVarsCache *reuse_cache, RZ_NULLABLE const char *fcn_name_pre, RZ_NULLABLE const char *fcn_name_post)
Definition: var.c:1232
RZ_API void rz_analysis_fcn_vars_add_types(RzAnalysis *analysis, RZ_NONNULL RzAnalysisFunction *fcn)
Updates the types database for function arguments.
Definition: var.c:1383
RZ_API int rz_analysis_var_get_argnum(RzAnalysisVar *var)
Definition: var.c:369
RZ_API bool rz_analysis_var_rename(RzAnalysisVar *var, const char *new_name, bool verbose)
Definition: var.c:348
RZ_API RZ_BORROW RzAnalysisVar * rz_analysis_function_get_var_byname(RzAnalysisFunction *fcn, const char *name)
Definition: var.c:247
RZ_API void rz_analysis_var_delete(RzAnalysisVar *var)
Definition: var.c:192
RZ_API RzAnalysisVar * rz_analysis_var_get_dst_var(RzAnalysisVar *var)
Definition: var.c:417
RZ_API const char * rz_analysis_function_get_var_reg_at(RzAnalysisFunction *fcn, st64 delta, ut64 addr)
Definition: var.c:314
RZ_API RzAnalysisVarAccess * rz_analysis_var_get_access_at(RzAnalysisVar *var, ut64 addr)
Definition: var.c:509
RZ_API void rz_analysis_function_delete_var(RzAnalysisFunction *fcn, RzAnalysisVar *var)
Definition: var.c:241
RZ_API void rz_analysis_var_set_type(RzAnalysisVar *var, RZ_OWN RzType *type, bool resolve_overlaps)
Definition: var.c:170
RZ_API void rz_analysis_fcn_vars_cache_init(RzAnalysis *analysis, RzAnalysisFcnVarsCache *cache, RzAnalysisFunction *fcn)
Definition: var.c:1209
RZ_DEPRECATE RZ_API RzList * rz_analysis_function_get_var_fields(RzAnalysisFunction *fcn, int kind)
Definition: var.c:1166
RZ_DEPRECATE RZ_API RzAnalysisVar * rz_analysis_get_used_function_var(RzAnalysis *analysis, ut64 addr)
Definition: var.c:398
RZ_API RZ_OWN char * rz_analysis_var_global_get_constraints_readable(RzAnalysisVarGlobal *glob)
Get the pritable string of global variable constraints.
Definition: var_global.c:331
RZ_API void rz_analysis_var_global_set_type(RzAnalysisVarGlobal *glob, RZ_NONNULL RZ_BORROW RzType *type)
Set the type of the global variable.
Definition: var_global.c:302
RZ_API RZ_BORROW RzAnalysisVarGlobal * rz_analysis_var_global_get_byaddr_at(RzAnalysis *analysis, ut64 addr)
Get the instance of global variable at the address.
Definition: var_global.c:207
RZ_API RZ_OWN RzAnalysisVarGlobal * rz_analysis_var_global_new(RZ_NONNULL const char *name, ut64 addr)
Create a new instance of global variable.
Definition: var_global.c:15
RZ_API bool rz_analysis_var_global_delete_byaddr_at(RzAnalysis *analysis, ut64 addr)
Same as rz_analysis_var_global_delete_byname at the address.
Definition: var_global.c:154
RZ_API bool rz_analysis_var_global_delete(RZ_NONNULL RzAnalysis *analysis, RZ_NONNULL RzAnalysisVarGlobal *glob)
Delete and free the global variable.
Definition: var_global.c:121
RZ_API RZ_OWN RzList * rz_analysis_var_global_get_all(RzAnalysis *analysis)
Get all of the added global variables.
Definition: var_global.c:259
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.
Definition: var_global.c:190
RZ_API void rz_analysis_var_global_free(RzAnalysisVarGlobal *glob)
Free the global variable instance.
Definition: var_global.c:79
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.
Definition: var_global.c:136
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.
Definition: var_global.c:172
RZ_API RZ_OWN bool rz_analysis_var_global_add(RzAnalysis *analysis, RZ_NONNULL RzAnalysisVarGlobal *global_var)
Add the global variable into hashtable.
Definition: var_global.c:46
RZ_API RZ_NULLABLE RzFlagItem * rz_analysis_var_global_get_flag_item(RzAnalysisVarGlobal *glob)
Get the flag item corresponding to the given variable.
Definition: var_global.c:101
RZ_API RZ_BORROW RzAnalysisVarGlobal * rz_analysis_var_global_get_byaddr_in(RzAnalysis *analysis, ut64 addr)
Get the instance of global variable contains the address.
Definition: var_global.c:228
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.
Definition: var_global.c:277
RZ_API void rz_analysis_var_global_add_constraint(RzAnalysisVarGlobal *glob, RzTypeConstraint *constraint)
Add a constaint to global variable.
Definition: var_global.c:320
static st64 delta
Definition: vmenus.c:2425
RZ_API void rz_analysis_list_vtables(RzAnalysis *analysis, RzOutputMode mode)
Definition: vtable.c:288
RZ_API ut64 rz_analysis_vtable_info_get_size(RVTableContext *context, RVTableInfo *vtable)
Definition: vtable.c:37
RZ_API void rz_analysis_vtable_info_free(RVTableInfo *vtable)
Definition: vtable.c:29
RZ_API RVTableInfo * rz_analysis_vtable_parse_at(RVTableContext *context, ut64 addr)
Definition: vtable.c:184
RZ_API RzList * rz_analysis_vtable_search(RVTableContext *context)
Definition: vtable.c:219
RZ_API bool rz_analysis_vtable_begin(RzAnalysis *analysis, RVTableContext *context)
Definition: vtable.c:41
ut64(WINAPI *w32_GetEnabledXStateFeatures)()
static char * regname(int reg)
Definition: dis.c:71
RZ_API RZ_OWN RzList * rz_analysis_xrefs_list(RzAnalysis *analysis)
Get list of all xrefs.
Definition: xrefs.c:206
RZ_API RzList * rz_analysis_xref_list_new()
Definition: xrefs.c:38
RZ_API RzList * rz_analysis_xrefs_get_from(RzAnalysis *analysis, ut64 addr)
Definition: xrefs.c:187
RZ_API RzList * rz_analysis_xrefs_get_to(RzAnalysis *analysis, ut64 addr)
Definition: xrefs.c:173
RZ_API RzList * rz_analysis_function_get_xrefs_to(RzAnalysisFunction *fcn)
Definition: xrefs.c:302
RZ_API ut64 rz_analysis_xrefs_count(RzAnalysis *analysis)
Definition: xrefs.c:272
RZ_API bool rz_analysis_xrefs_init(RzAnalysis *analysis)
Definition: xrefs.c:245
RZ_API const char * rz_analysis_xrefs_type_tostring(RzAnalysisXRefType type)
Definition: xrefs.c:216
RZ_API bool rz_analysis_xrefs_set(RzAnalysis *analysis, ut64 from, ut64 to, RzAnalysisXRefType type)
Definition: xrefs.c:117
RZ_API bool rz_analysis_xrefs_deln(RzAnalysis *analysis, ut64 from, ut64 to, RzAnalysisXRefType type)
Definition: xrefs.c:148
RZ_API bool rz_analysis_xref_del(RzAnalysis *analysis, ut64 from, ut64 to)
Definition: xrefs.c:163
RZ_API RzList * rz_analysis_function_get_xrefs_from(RzAnalysisFunction *fcn)
Definition: xrefs.c:297
RZ_API RzAnalysisXRefType rz_analysis_xrefs_type(char ch)
Definition: xrefs.c:232
static const char * cb[]
Definition: z80_tab.h:176
static int verbose
Definition: z80asm.c:73
static int addr
Definition: z80asm.c:58
reftype
Definition: z80asm.h:66