Document some RAnal members and remove some unused ones (#17214)

This commit is contained in:
Florian Märkl 2020-07-06 06:18:17 +02:00 committed by GitHub
parent f91f2ac1d8
commit f88d57d1cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 29 deletions

View File

@ -129,7 +129,6 @@ R_API RAnal *r_anal_new(void) {
anal->stackptr = 0;
anal->lineswidth = 0;
anal->fcns = r_list_newf (r_anal_function_free);
anal->refs = r_anal_ref_list_new ();
anal->leaddrs = NULL;
r_anal_set_bits (anal, 32);
anal->plugins = r_list_newf ((RListFree) r_anal_plugin_free);
@ -168,10 +167,8 @@ R_API RAnal *r_anal_free(RAnal *a) {
r_spaces_fini (&a->meta_spaces);
r_spaces_fini (&a->zign_spaces);
r_anal_pin_fini (a);
r_list_free (a->refs);
r_syscall_free (a->syscall);
r_reg_free (a->reg);
r_anal_op_free (a->queued);
ht_up_free (a->dict_refs);
ht_up_free (a->dict_xrefs);
r_list_free (a->leaddrs);
@ -450,8 +447,6 @@ R_API int r_anal_purge (RAnal *anal) {
sdb_reset (anal->sdb_classes_attrs);
r_list_free (anal->fcns);
anal->fcns = r_list_newf (r_anal_function_free);
r_list_free (anal->refs);
anal->refs = r_anal_ref_list_new ();
return 0;
}

View File

@ -598,24 +598,22 @@ typedef struct r_anal_hint_cb_t {
} RHintCb;
typedef struct r_anal_t {
char *cpu;
char *os;
int bits;
int lineswidth; // wtf
int big_endian;
int sleep; // sleep some usecs before analyzing more (avoid 100% cpu usages)
RAnalCPPABI cpp_abi;
char *cpu; // anal.cpu
char *os; // asm.os
int bits; // asm.bits
int lineswidth; // asm.lines.width
int big_endian; // cfg.bigendian
int sleep; // anal.sleep, sleep some usecs before analyzing more (avoid 100% cpu usages)
RAnalCPPABI cpp_abi; // anal.cpp.abi
void *user;
ut64 gp; // global pointer. used for mips. but can be used by other arches too in the future
ut64 gp; // anal.gp, global pointer. used for mips. but can be used by other arches too in the future
RBTree bb_tree; // all basic blocks by address. They can overlap each other, but must never start at the same address.
RList *fcns;
HtUP *ht_addr_fun; // address => function
HtPP *ht_name_fun; // name => function
RList *refs;
RReg *reg;
ut8 *last_disasm_reg;
RSyscall *syscall;
struct r_anal_op_t *queued;
int diff_ops;
double diff_thbb;
double diff_thfcn;
@ -626,34 +624,26 @@ typedef struct r_anal_t {
RFlagSet flg_fcn_set;
RBinBind binb; // Set only from core when an analysis plugin is called.
RCoreBind coreb;
int maxreflines;
int trace;
int esil_goto_limit;
int pcalign;
int bitshift;
//struct r_anal_ctx_t *ctx;
int maxreflines; // asm.lines.maxref
int esil_goto_limit; // esil.gotolimit
int pcalign; // asm.pcalign
struct r_anal_esil_t *esil;
struct r_anal_plugin_t *cur;
RAnalRange *limit;
RAnalRange *limit; // anal.from, anal.to
RList *plugins;
Sdb *sdb_types;
Sdb *sdb_fmts;
Sdb *sdb_zigns;
HtUP *dict_refs;
HtUP *dict_xrefs;
bool recursive_noreturn;
bool recursive_noreturn; // anal.rnr
RSpaces zign_spaces;
char *zign_path;
char *zign_path; // dir.zigns
PrintfCallback cb_printf;
//moved from RAnalFcn
Sdb *sdb; // root
Sdb *sdb_fcns;
Sdb *sdb_pins;
#define DEPRECATE 1
#if DEPRECATE
Sdb *sdb_args; //
Sdb *sdb_vars; // globals?
#endif
HtUP/*<RVector<RAnalAddrHintRecord>>*/ *addr_hints; // all hints that correspond to a single address
RBTree/*<RAnalArchHintRecord>*/ arch_hints;
RBTree/*<RAnalArchBitsRecord>*/ bits_hints;