Final Analysis Renaming (#124)

* Rename missing Analysis Defines
* Rename analysis config vars and other lower case stuff
* Rename test/db/analysis
* Fix analysis tests

Co-authored-by: Anton Kochkov <anton.kochkov@gmail.com>
This commit is contained in:
Florian Märkl 2020-12-08 08:05:24 +01:00 committed by GitHub
parent 40f8ac202a
commit d53d1e3845
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
167 changed files with 690 additions and 690 deletions

View file

@ -4,7 +4,7 @@ Brainfuck support for rizin
Plugins for brainfuck:
- `asm.bf` - brainfuck assembler and disassembler
- `debug.bf` - debugger using bfvm
- `anal.bf` - code analysis for brainfuck
- `analysis.bf` - code analysis for brainfuck
- `bp.bf` - breakpoints support (experimental)
To debug a brainfuck program:

View file

@ -1455,7 +1455,7 @@ RZ_API int rz_analysis_fcn(RzAnalysis *analysis, RzAnalysisFunction *fcn, ut64 a
analysis->visited = set_u_new ();
}
if (set_u_contains (analysis->visited, addr)) {
eprintf ("rz_analysis_fcn: anal.norevisit at 0x%08"PFMT64x" %c\n", addr, reftype);
eprintf ("rz_analysis_fcn: analysis.norevisit at 0x%08"PFMT64x" %c\n", addr, reftype);
return RZ_ANALYSIS_RET_END;
}
set_u_add (analysis->visited, addr);

View file

@ -156,7 +156,7 @@ RZ_API RzAnalysisFunction *rz_analysis_create_function(RzAnalysis *analysis, con
free (fcn->name);
fcn->name = strdup (name);
} else {
const char *fcnprefix = analysis->coreb.cfgGet ? analysis->coreb.cfgGet (analysis->coreb.core, "anal.fcnprefix") : NULL;
const char *fcnprefix = analysis->coreb.cfgGet ? analysis->coreb.cfgGet (analysis->coreb.core, "analysis.fcnprefix") : NULL;
if (!fcnprefix) {
fcnprefix = "fcn";
}

View file

@ -67,14 +67,14 @@ static void arch_hint_record_free_rb(RBNode *node, void *user) {
free (record);
}
// used in anal.c, but no API needed
// used in analysis.c, but no API needed
void rz_analysis_hint_storage_init(RzAnalysis *a) {
a->addr_hints = ht_up_new (NULL, addr_hint_record_ht_free, NULL);
a->arch_hints = NULL;
a->bits_hints = NULL;
}
// used in anal.c, but no API needed
// used in analysis.c, but no API needed
void rz_analysis_hint_storage_fini(RzAnalysis *a) {
ht_up_free (a->addr_hints);
rz_rbtree_free (a->arch_hints, arch_hint_record_free_rb, NULL);

View file

@ -347,7 +347,7 @@ RZ_API bool try_get_jmptbl_info(RzAnalysis *analysis, RzAnalysisFunction *fcn, u
}
// predecessor must be a conditional jump
if (!prev_bb || !prev_bb->jump || !prev_bb->fail) {
aprintf ("Warning: [anal.jmp.tbl] Missing predecesessor cjmp bb at 0x%08"PFMT64x"\n", addr);
aprintf ("Warning: [analysis.jmp.tbl] Missing predecesessor cjmp bb at 0x%08"PFMT64x"\n", addr);
return false;
}

View file

@ -152,7 +152,7 @@ rz_analysis_sources = [
'../asm/arch/pyc/opcode_38.c',
'../asm/arch/pyc/opcode_39.c',
'../asm/arch/pyc/opcode_3x.c',
'../asm/arch/pyc/opcode_anal.c',
'../asm/arch/pyc/opcode_analysis.c',
'../asm/arch/pyc/opcode_arg_fmt.c',
'../asm/arch/pyc/opcode.c',
'../asm/arch/pyc/pyc_dis.c'

View file

@ -963,7 +963,7 @@ RzAnalysisPlugin rz_analysis_plugin_6502 = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_6502,
.version = RZ_VERSION
};

View file

@ -205,7 +205,7 @@ RzAnalysisPlugin rz_analysis_plugin_6502_cs = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_6502_cs,
.version = RZ_VERSION
};
@ -222,7 +222,7 @@ RzAnalysisPlugin rz_analysis_plugin_6502_cs = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.version = RZ_VERSION
};
#endif

View file

@ -1048,7 +1048,7 @@ RzAnalysisPlugin rz_analysis_plugin_8051 = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_8051,
.version = RZ_VERSION
};

View file

@ -335,7 +335,7 @@ RzAnalysisPlugin rz_analysis_plugin_amd29k = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_amd29k,
.version = RZ_VERSION
};

View file

@ -1150,7 +1150,7 @@ RzAnalysisPlugin rz_analysis_plugin_arc = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_arc,
.version = RZ_VERSION,
};

View file

@ -4465,7 +4465,7 @@ RzAnalysisPlugin rz_analysis_plugin_arm_cs = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_arm_cs,
.version = RZ_VERSION
};

View file

@ -475,7 +475,7 @@ RzAnalysisPlugin rz_analysis_plugin_arm_gnu = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_arm_gnu,
.version = RZ_VERSION
};

View file

@ -2109,7 +2109,7 @@ RzAnalysisPlugin rz_analysis_plugin_avr = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_avr,
.version = RZ_VERSION
};

View file

@ -158,7 +158,7 @@ RzAnalysisPlugin rz_analysis_plugin_bf = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_bf,
.version = RZ_VERSION
};

View file

@ -161,7 +161,7 @@ RzAnalysisPlugin rz_analysis_plugin_chip8 = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_chip8,
.version = RZ_VERSION
};

View file

@ -129,7 +129,7 @@ RzAnalysisPlugin rz_analysis_plugin_cr16 = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_cr16,
.version = RZ_VERSION
};

View file

@ -287,7 +287,7 @@ RzAnalysisPlugin rz_analysis_plugin_cris = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_cris,
.version = RZ_VERSION
};

View file

@ -767,7 +767,7 @@ RzAnalysisPlugin rz_analysis_plugin_dalvik = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_dalvik,
.version = RZ_VERSION
};

View file

@ -172,7 +172,7 @@ RzAnalysisPlugin rz_analysis_plugin_ebc = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_ebc,
.version = RZ_VERSION
};

View file

@ -1579,7 +1579,7 @@ RzAnalysisPlugin rz_analysis_plugin_gb = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_gb,
.version = RZ_VERSION
};

View file

@ -734,7 +734,7 @@ RzAnalysisPlugin rz_analysis_plugin_h8300 = {
#ifndef RZ_PLUGIN_INCORE
struct rz_lib_struct_t rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_h8300,
.version = RZ_VERSION
};

View file

@ -102,7 +102,7 @@ RzAnalysisPlugin rz_analysis_plugin_hexagon = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_hexagon_v6,
.version = RZ_VERSION
};

View file

@ -214,7 +214,7 @@ RzAnalysisPlugin rz_analysis_plugin_i4004 = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_i4004,
.version = RZ_VERSION
};

View file

@ -198,7 +198,7 @@ RzAnalysisPlugin rz_analysis_plugin_i8080 = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_i8080,
.version = RZ_VERSION
};

View file

@ -346,7 +346,7 @@ RzAnalysisPlugin rz_analysis_plugin_java = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_java,
.version = RZ_VERSION
};

View file

@ -550,7 +550,7 @@ RzAnalysisPlugin rz_analysis_plugin_m680x_cs = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_m680x_cs,
.version = RZ_VERSION
};

View file

@ -782,7 +782,7 @@ RzAnalysisPlugin rz_analysis_plugin_m68k_cs = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_m68k_cs,
.version = RZ_VERSION
};

View file

@ -47,7 +47,7 @@ RzAnalysisPlugin rz_analysis_plugin_malbolge = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_malbolge,
.version = RZ_VERSION
};

View file

@ -126,7 +126,7 @@ RzAnalysisPlugin rz_analysis_plugin_mcore = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_mcore,
.version = RZ_VERSION
};

View file

@ -1228,7 +1228,7 @@ RzAnalysisPlugin rz_analysis_plugin_mips_cs = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_mips_cs,
.version = RZ_VERSION
};

View file

@ -1787,7 +1787,7 @@ RzAnalysisPlugin rz_analysis_plugin_mips_gnu = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_mips_gnu
};
#endif

View file

@ -98,7 +98,7 @@ RzAnalysisPlugin rz_analysis_plugin_nios2 = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_nios2,
.version = RZ_VERSION
};

View file

@ -25,7 +25,7 @@ RzAnalysisPlugin rz_analysis_plugin_null = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_null,
.version = RZ_VERSION
};

View file

@ -198,7 +198,7 @@ RzAnalysisPlugin rz_analysis_plugin_or1k = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_or1k,
.version = RZ_VERSION
};

View file

@ -1195,7 +1195,7 @@ RzAnalysisPlugin rz_analysis_plugin_pic = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_pic,
.version = RZ_VERSION
};

View file

@ -1283,7 +1283,7 @@ RzAnalysisPlugin rz_analysis_plugin_ppc_cs = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_ppc_cs,
.version = RZ_VERSION
};

View file

@ -153,7 +153,7 @@ RzAnalysisPlugin rz_analysis_plugin_ppc_gnu = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_ppc_gnu,
.version = RZ_VERSION
};

View file

@ -149,7 +149,7 @@ RzAnalysisPlugin rz_analysis_plugin_pyc = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_pyc,
.version = RZ_VERSION
};

View file

@ -835,7 +835,7 @@ RzAnalysisPlugin rz_analysis_plugin_riscv = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_riscv,
.version = RZ_VERSION
};

View file

@ -603,7 +603,7 @@ RzAnalysisPlugin rz_analysis_plugin_riscv_cs = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_riscv_cs,
.version = RZ_VERSION
};
@ -613,7 +613,7 @@ RZ_API RzLibStruct rizin_plugin = {
RzAnalysisPlugin rz_analysis_plugin_riscv_cs = {0};
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.version = RZ_VERSION
};
#endif

View file

@ -700,7 +700,7 @@ RzAnalysisPlugin rz_analysis_plugin_rsp = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_rsp,
.version = RZ_VERSION
};

View file

@ -1169,7 +1169,7 @@ RzAnalysisPlugin rz_analysis_plugin_sh = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_sh,
.version = RZ_VERSION
};

View file

@ -265,7 +265,7 @@ RzAnalysisPlugin rz_analysis_plugin_snes = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_snes,
.version = RZ_VERSION
};

View file

@ -394,7 +394,7 @@ RzAnalysisPlugin rz_analysis_plugin_sparc_cs = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_sparc_cs,
.version = RZ_VERSION
};

View file

@ -620,7 +620,7 @@ RzAnalysisPlugin rz_analysis_plugin_sparc_gnu = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_sparc_gnu,
.version = RZ_VERSION
};

View file

@ -206,7 +206,7 @@ RzAnalysisPlugin rz_analysis_plugin_sysz = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_sysz,
.version = RZ_VERSION
};

View file

@ -12,7 +12,7 @@
static tms320_dasm_t engine = { 0 };
typedef int (* TMS_ANAL_OP_FN)(RzAnalysis *analysis, RzAnalysisOp *op, ut64 addr, const ut8 *buf, int len);
typedef int (* TMS_ANALYSIS_OP_FN)(RzAnalysis *analysis, RzAnalysisOp *op, ut64 addr, const ut8 *buf, int len);
int tms320_c54x_op(RzAnalysis *analysis, RzAnalysisOp *op, ut64 addr, const ut8 *buf, int len);
int tms320_c55x_op(RzAnalysis *analysis, RzAnalysisOp *op, ut64 addr, const ut8 *buf, int len);
@ -81,7 +81,7 @@ int tms320_c55x_op(RzAnalysis *analysis, RzAnalysisOp *op, ut64 addr, const ut8
}
int tms320_op(RzAnalysis * analysis, RzAnalysisOp * op, ut64 addr, const ut8 * buf, int len, RzAnalysisOpMask mask) {
TMS_ANAL_OP_FN aop = tms320_c55x_op;
TMS_ANALYSIS_OP_FN aop = tms320_c55x_op;
if (analysis->cpu && rz_str_casecmp(analysis->cpu, "c64x") == 0) {
#ifdef CAPSTONE_TMS320C64X_H
@ -121,7 +121,7 @@ RzAnalysisPlugin rz_analysis_plugin_tms320 = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_tms320,
.version = RZ_VERSION
};

View file

@ -210,7 +210,7 @@ RzAnalysisPlugin rz_analysis_plugin_tms320c64x = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_tms320c64x,
.version = RZ_VERSION
};

View file

@ -84,7 +84,7 @@ RzAnalysisPlugin rz_analysis_plugin_tricore = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_tricore,
.version = RZ_VERSION
};

View file

@ -456,7 +456,7 @@ RzAnalysisPlugin rz_analysis_plugin_v810 = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_v810,
.version = RZ_VERSION
};

View file

@ -588,7 +588,7 @@ RzAnalysisPlugin rz_analysis_plugin_v850 = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_v850,
.version = RZ_VERSION
};

View file

@ -97,7 +97,7 @@ RzAnalysisPlugin rz_analysis_plugin_vax = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_vax,
.version = RZ_VERSION
};

View file

@ -469,7 +469,7 @@ RzAnalysisPlugin rz_analysis_plugin_wasm = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_wasm,
.version = RZ_VERSION
};

View file

@ -130,7 +130,7 @@ RzAnalysisPlugin rz_analysis_plugin_ws = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_ws,
.version = RZ_VERSION
};

View file

@ -3791,7 +3791,7 @@ RzAnalysisPlugin rz_analysis_plugin_x86_cs = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_x86_cs,
.version = RZ_VERSION
};

View file

@ -220,7 +220,7 @@ RzAnalysisPlugin rz_analysis_plugin_xap = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_xap,
.version = RZ_VERSION
};

View file

@ -135,7 +135,7 @@ RzAnalysisPlugin rz_analysis_plugin_xcore_cs = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_xcore_cs,
.version = RZ_VERSION
};

View file

@ -472,7 +472,7 @@ static XtensaOpFn xtensa_lsai_fns[] = {
xtensa_store_op,
xtensa_store_op,
xtensa_store_op,
xtensa_null_op, /*xtensa_cache_op,probably not interesting for anal?*/
xtensa_null_op, /*xtensa_cache_op,probably not interesting for analysis?*/
xtensa_unk_op,
xtensa_load_op,
xtensa_mov_op,
@ -2028,7 +2028,7 @@ RzAnalysisPlugin rz_analysis_plugin_xtensa = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_xtensa,
.version = RZ_VERSION
};

View file

@ -426,7 +426,7 @@ RzAnalysisPlugin rz_analysis_plugin_z80 = {
#ifndef RZ_PLUGIN_INCORE
RZ_API RzLibStruct rizin_plugin = {
.type = RZ_LIB_TYPE_ANAL,
.type = RZ_LIB_TYPE_ANALYSIS,
.data = &rz_analysis_plugin_z80,
.version = RZ_VERSION
};

View file

@ -27,7 +27,7 @@ OBJ_PYC+=$(PYC_ASM_ROOT)/opcode_37.o
OBJ_PYC+=$(PYC_ASM_ROOT)/opcode_38.o
OBJ_PYC+=$(PYC_ASM_ROOT)/opcode_39.o
OBJ_PYC+=$(PYC_ASM_ROOT)/opcode_3x.o
OBJ_PYC+=$(PYC_ASM_ROOT)/opcode_anal.o
OBJ_PYC+=$(PYC_ASM_ROOT)/opcode_analysis.o
OBJ_PYC+=$(PYC_ASM_ROOT)/opcode_arg_fmt.o
OBJ_PYC+=$(PYC_ASM_ROOT)/opcode.o

View file

@ -774,7 +774,7 @@ static void recovery_apply_vtable(RVTableContext *context, const char *class_nam
}
/**
* @brief Add any base class information about the type into anal/classes
* @brief Add any base class information about the type into analysis/classes
*
* @param context
* @param cti

View file

@ -67,7 +67,7 @@ RZ_API RzList *rz_sign_fcn_vars(RzAnalysis *a, RzAnalysisFunction *fcn) {
RZ_API RzList *rz_sign_fcn_types(RzAnalysis *a, RzAnalysisFunction *fcn) {
// From anal/types/*:
// From analysis/types/*:
// Get key-value types from sdb matching "func.%s", fcn->name
// Get func.%s.args (number of args)
// Get type,name pairs
@ -260,7 +260,7 @@ RZ_API bool rz_sign_deserialize(RzAnalysis *a, RzSignItem *it, const char *k, co
}
RzSignType st = (RzSignType)*word;
switch (st) {
case RZ_SIGN_ANAL:
case RZ_SIGN_ANALYSIS:
eprintf ("Unsupported\n");
break;
case RZ_SIGN_NAME:

View file

@ -729,7 +729,7 @@ static void analysis_SETUP_ASYNC_WITH(RzAnalysisOp *op, pyc_opcode_object *op_ob
op->fail = mid;
}
static op_analysis_func op_anal[] = {
static op_analysis_func op_analysis[] = {
{ "BEFORE_ASYNC_WITH", analysis_BEFORE_ASYNC_WITH },
{ "BEGIN_FINALLY", analysis_BEGIN_FINALLY },
{ "BINARY_ADD", analysis_BINARY_ADD },
@ -898,9 +898,9 @@ static op_analysis_func op_anal[] = {
void analysis_pyc_op(RzAnalysisOp *op, pyc_opcode_object *op_obj, ut32 oparg) {
size_t i;
for (i = 0; i < (sizeof (op_anal) / sizeof (op_analysis_func)); i++) {
if (!strcmp (op_anal[i].op_name, op_obj->op_name)) {
op_anal[i].func (op, op_obj, oparg);
for (i = 0; i < (sizeof (op_analysis) / sizeof (op_analysis_func)); i++) {
if (!strcmp (op_analysis[i].op_name, op_obj->op_name)) {
op_analysis[i].func (op, op_obj, oparg);
break;
}
}

View file

@ -156,7 +156,7 @@ rz_asm_sources = [
'arch/pyc/opcode_38.c',
'arch/pyc/opcode_39.c',
'arch/pyc/opcode_3x.c',
'arch/pyc/opcode_anal.c',
'arch/pyc/opcode_analysis.c',
'arch/pyc/opcode_arg_fmt.c',
'arch/pyc/opcode.c',
'arch/pyc/pyc_dis.c',

View file

@ -28,7 +28,7 @@ OBJ_PYC+=$(PYC_ROOT)/opcode_38.o
OBJ_PYC+=$(PYC_ROOT)/opcode_39.o
OBJ_PYC+=$(PYC_ROOT)/opcode_3x.o
OBJ_PYC+=$(PYC_ROOT)/opcode_arg_fmt.o
OBJ_PYC+=$(PYC_ROOT)/opcode_anal.o
OBJ_PYC+=$(PYC_ROOT)/opcode_analysis.o
OBJ_PYC+=$(PYC_ROOT)/opcode.o
OBJ_PYC+=$(PYC_ROOT)/pyc_dis.o

View file

@ -3490,7 +3490,7 @@ static int agraph_print(RzAGraph *g, int is_interactive, RzCore *core, RzAnalysi
static void check_function_modified(RzCore *core, RzAnalysisFunction *fcn) {
if (rz_analysis_function_was_modified (fcn)) {
if (rz_config_get_i (core->config, "anal.detectwrites")
if (rz_config_get_i (core->config, "analysis.detectwrites")
|| rz_cons_yesno ('y', "Function was modified. Reanalyze? (Y/n)")) {
rz_analysis_function_update_analysis (fcn);
}

View file

@ -209,7 +209,7 @@ static RzList *parse_format(RzCore *core, char *fmt) {
return NULL;
}
Sdb *s = core->analysis->sdb_fmts;
const char *spec = rz_config_get (core->config, "anal.types.spec");
const char *spec = rz_config_get (core->config, "analysis.types.spec");
char arr[10] = {0};
char *ptr = strchr (fmt, '%');
fmt[strlen (fmt) - 1] = '\0';
@ -285,7 +285,7 @@ static void type_match(RzCore *core, char *fcn_name, ut64 addr, ut64 baddr, cons
RzAnalysis *analysis = core->analysis;
RzList *types = NULL;
int idx = sdb_num_get (trace, "idx", 0);
bool verbose = rz_config_get_i (core->config, "anal.types.verbose");
bool verbose = rz_config_get_i (core->config, "analysis.types.verbose");
bool stack_rev = false, in_stack = false, format = false;
if (!fcn_name || !cc) {
@ -462,7 +462,7 @@ RZ_API void rz_core_analysis_type_match(RzCore *core, RzAnalysisFunction *fcn) {
RzAnalysis *analysis = core->analysis;
Sdb *TDB = analysis->sdb_types;
bool chk_constraint = rz_config_get_i (core->config, "anal.types.constraint");
bool chk_constraint = rz_config_get_i (core->config, "analysis.types.constraint");
int ret, bsize = RZ_MAX (64, core->blocksize);
const int mininstrsz = rz_analysis_archinfo (analysis, RZ_ANALYSIS_ARCHINFO_MIN_OP_SIZE);
const int minopcode = RZ_MAX (1, mininstrsz);

View file

@ -190,7 +190,7 @@ static void printFunctionCommands(RzCore *core, fcn_t* fcn, const char *name) {
RzListIter *fcn_iter;
bb_t *cur = NULL;
const char *pfx = rz_config_get (core->config, "anal.fcnprefix");
const char *pfx = rz_config_get (core->config, "analysis.fcnprefix");
if (!pfx) {
pfx = "fcn";
}
@ -215,7 +215,7 @@ static void createFunction(RzCore *core, fcn_t* fcn, const char *name) {
RzListIter *fcn_iter;
bb_t *cur = NULL;
const char *pfx = rz_config_get (core->config, "anal.fcnprefix");
const char *pfx = rz_config_get (core->config, "analysis.fcnprefix");
if (!pfx) {
pfx = "fcn";
}
@ -262,7 +262,7 @@ RZ_API bool core_analysis_bbs(RzCore *core, const char* input) {
bb_t *block = NULL;
int invalid_instruction_barrier = -20000;
bool debug = rz_config_get_i (core->config, "cfg.debug");
bool nopskip = rz_config_get_i (core->config, "anal.nopskip");
bool nopskip = rz_config_get_i (core->config, "analysis.nopskip");
block_list = rz_list_new ();
if (!block_list) {

View file

@ -115,7 +115,7 @@ static char *getFunctionName(RzCore *core, ut64 addr) {
static RzCore *mycore = NULL;
// XXX: copypaste from anal/data.c
// XXX: copypaste from analysis/data.c
#define MINLEN 1
static int is_string(const ut8 *buf, int size, int *len) {
int i, fakeLen = 0;
@ -750,13 +750,13 @@ static int __core_analysis_fcn(RzCore *core, ut64 at, ut64 from, int reftype, in
// rz_sys_backtrace ();
return false;
}
int has_next = rz_config_get_i (core->config, "anal.hasnext");
int has_next = rz_config_get_i (core->config, "analysis.hasnext");
RzAnalysisHint *hint = NULL;
int i, nexti = 0;
ut64 *next = NULL;
int fcnlen;
RzAnalysisFunction *fcn = rz_analysis_function_new (core->analysis);
const char *fcnpfx = rz_config_get (core->config, "anal.fcnprefix");
const char *fcnpfx = rz_config_get (core->config, "analysis.fcnprefix");
if (!fcnpfx) {
fcnpfx = "fcn";
}
@ -843,7 +843,7 @@ static int __core_analysis_fcn(RzCore *core, ut64 at, ut64 from, int reftype, in
RZ_FREE (fcn->name);
const char *fcnpfx = rz_analysis_fcntype_tostring (fcn->type);
if (!fcnpfx || !*fcnpfx || !strcmp (fcnpfx, "fcn")) {
fcnpfx = rz_config_get (core->config, "anal.fcnprefix");
fcnpfx = rz_config_get (core->config, "analysis.fcnprefix");
}
fcn->name = rz_str_newf ("%s.%08"PFMT64x, fcnpfx, fcn->addr);
autoname_imp_trampoline (core, fcn);
@ -1000,7 +1000,7 @@ RZ_API RzAnalysisOp* rz_core_analysis_op(RzCore *core, ut64 addr, int mask) {
if (!op->mnemonic && mask & RZ_ANALYSIS_OP_MASK_DISASM) {
RzAsmOp asmop;
if (core->analysis->verbose) {
eprintf ("WARNING: Implement RzAnalysisOp.MASK_DISASM for current anal.arch. Using the sluggish RzAsmOp fallback for now.\n");
eprintf ("WARNING: Implement RzAnalysisOp.MASK_DISASM for current analysis.arch. Using the sluggish RzAsmOp fallback for now.\n");
}
rz_asm_set_pc (core->rasm, addr);
rz_asm_op_init (&asmop);
@ -1391,12 +1391,12 @@ RZ_API void rz_core_analysis_hint_print(RzAnalysis* a, ut64 addr, int mode) {
static char *core_analysis_graph_label(RzCore *core, RzAnalysisBlock *bb, int opts) {
int is_html = rz_cons_singleton ()->is_html;
int is_json = opts & RZ_CORE_ANAL_JSON;
int is_json = opts & RZ_CORE_ANALYSIS_JSON;
char cmd[1024], file[1024], *cmdstr = NULL, *filestr = NULL, *str = NULL;
int line = 0, oline = 0, idx = 0;
ut64 at;
if (opts & RZ_CORE_ANAL_GRAPHLINES) {
if (opts & RZ_CORE_ANALYSIS_GRAPHLINES) {
for (at = bb->addr; at < bb->addr + bb->size; at += 2) {
rz_bin_addr2line (core->bin, at, file, sizeof (file) - 1, &line);
if (line != 0 && line != oline && strcmp (file, "??")) {
@ -1421,10 +1421,10 @@ static char *core_analysis_graph_label(RzCore *core, RzAnalysisBlock *bb, int op
}
oline = line;
}
} else if (opts & RZ_CORE_ANAL_STAR) {
} else if (opts & RZ_CORE_ANALYSIS_STAR) {
snprintf (cmd, sizeof (cmd), "pdb %"PFMT64u" @ 0x%08" PFMT64x, bb->size, bb->addr);
str = rz_core_cmd_str (core, cmd);
} else if (opts & RZ_CORE_ANAL_GRAPHBODY) {
} else if (opts & RZ_CORE_ANALYSIS_GRAPHBODY) {
const bool scrColor = rz_config_get (core->config, "scr.color");
const bool scrUtf8 = rz_config_get (core->config, "scr.utf8");
rz_config_set_i (core->config, "scr.color", COLOR_MODE_DISABLED);
@ -1464,9 +1464,9 @@ static void core_analysis_color_curr_node(RzCore *core, RzAnalysisBlock *bbi) {
static int core_analysis_graph_construct_edges (RzCore *core, RzAnalysisFunction *fcn, int opts, PJ *pj, Sdb *DB) {
RzAnalysisBlock *bbi;
RzListIter *iter;
int is_keva = opts & RZ_CORE_ANAL_KEYVALUE;
int is_star = opts & RZ_CORE_ANAL_STAR;
int is_json = opts & RZ_CORE_ANAL_JSON;
int is_keva = opts & RZ_CORE_ANALYSIS_KEYVALUE;
int is_star = opts & RZ_CORE_ANALYSIS_STAR;
int is_json = opts & RZ_CORE_ANALYSIS_JSON;
int is_html = rz_cons_singleton ()->is_html;
char *pal_jump = palColorFor ("graph.true");
char *pal_fail = palColorFor ("graph.false");
@ -1589,14 +1589,14 @@ static int core_analysis_graph_construct_edges (RzCore *core, RzAnalysisFunction
static int core_analysis_graph_construct_nodes (RzCore *core, RzAnalysisFunction *fcn, int opts, PJ *pj, Sdb *DB) {
RzAnalysisBlock *bbi;
RzListIter *iter;
int is_keva = opts & RZ_CORE_ANAL_KEYVALUE;
int is_star = opts & RZ_CORE_ANAL_STAR;
int is_json = opts & RZ_CORE_ANAL_JSON;
int is_keva = opts & RZ_CORE_ANALYSIS_KEYVALUE;
int is_star = opts & RZ_CORE_ANALYSIS_STAR;
int is_json = opts & RZ_CORE_ANALYSIS_JSON;
int is_html = rz_cons_singleton ()->is_html;
int left = 300;
int top = 0;
int is_json_format_disasm = opts & RZ_CORE_ANAL_JSON_FORMAT_DISASM;
int is_json_format_disasm = opts & RZ_CORE_ANALYSIS_JSON_FORMAT_DISASM;
char *pal_curr = palColorFor ("graph.current");
char *pal_traced = palColorFor ("graph.traced");
char *pal_box4 = palColorFor ("graph.box4");
@ -1670,7 +1670,7 @@ static int core_analysis_graph_construct_nodes (RzCore *core, RzAnalysisFunction
continue;
}
if ((str = core_analysis_graph_label (core, bbi, opts))) {
if (opts & RZ_CORE_ANAL_GRAPHDIFF) {
if (opts & RZ_CORE_ANALYSIS_GRAPHDIFF) {
const char *difftype = bbi->diff? (\
bbi->diff->type==RZ_ANALYSIS_DIFF_TYPE_MATCH? "lightgray":
bbi->diff->type==RZ_ANALYSIS_DIFF_TYPE_UNMATCH? "yellow": "red"): "orange";
@ -1820,8 +1820,8 @@ static int core_analysis_graph_construct_nodes (RzCore *core, RzAnalysisFunction
}
static int core_analysis_graph_nodes(RzCore *core, RzAnalysisFunction *fcn, int opts, PJ *pj) {
int is_json = opts & RZ_CORE_ANAL_JSON;
int is_keva = opts & RZ_CORE_ANAL_KEYVALUE;
int is_json = opts & RZ_CORE_ANALYSIS_JSON;
int is_keva = opts & RZ_CORE_ANALYSIS_KEYVALUE;
int nodes = 0;
Sdb *DB = NULL;
char *pal_jump = palColorFor ("graph.true");
@ -1951,7 +1951,7 @@ RZ_API int rz_core_analysis_fcn(RzCore *core, ut64 at, ut64 from, int reftype, i
return 0;
}
const bool use_esil = rz_config_get_i (core->config, "anal.esil");
const bool use_esil = rz_config_get_i (core->config, "analysis.esil");
RzAnalysisFunction *fcn;
//update bits based on the core->offset otherwise we could have the
@ -1966,7 +1966,7 @@ RZ_API int rz_core_analysis_fcn(RzCore *core, ut64 at, ut64 from, int reftype, i
return false;
}
}
if (rz_config_get_i (core->config, "anal.a2f")) {
if (rz_config_get_i (core->config, "analysis.a2f")) {
rz_core_cmd0 (core, ".a2f");
return 0;
}
@ -3579,7 +3579,7 @@ static RzList *analysis_graph_to(RzCore *core, ut64 addr, int depth, HtUP *avoid
}
RZ_API RzList* rz_core_analysis_graph_to(RzCore *core, ut64 addr, int n) {
int depth = rz_config_get_i (core->config, "anal.graph_depth");
int depth = rz_config_get_i (core->config, "analysis.graph_depth");
RzList *path, *paths = rz_list_new ();
HtUP *avoid = ht_up_new0 ();
while (n) {
@ -3605,10 +3605,10 @@ RZ_API int rz_core_analysis_graph(RzCore *core, ut64 addr, int opts) {
ut64 to = rz_config_get_i (core->config, "graph.to");
const char *font = rz_config_get (core->config, "graph.font");
int is_html = rz_cons_singleton ()->is_html;
int is_json = opts & RZ_CORE_ANAL_JSON;
int is_json_format_disasm = opts & RZ_CORE_ANAL_JSON_FORMAT_DISASM;
int is_keva = opts & RZ_CORE_ANAL_KEYVALUE;
int is_star = opts & RZ_CORE_ANAL_STAR;
int is_json = opts & RZ_CORE_ANALYSIS_JSON;
int is_json_format_disasm = opts & RZ_CORE_ANALYSIS_JSON_FORMAT_DISASM;
int is_keva = opts & RZ_CORE_ANALYSIS_KEYVALUE;
int is_star = opts & RZ_CORE_ANALYSIS_STAR;
RzConfigHold *hc;
RzAnalysisFunction *fcni;
RzListIter *iter;
@ -3627,7 +3627,7 @@ RZ_API int rz_core_analysis_graph(RzCore *core, ut64 addr, int opts) {
}
rz_config_hold_i (hc, "asm.lines", "asm.bytes", "asm.dwarf", NULL);
//opts |= RZ_CORE_ANAL_GRAPHBODY;
//opts |= RZ_CORE_ANALYSIS_GRAPHBODY;
rz_config_set_i (core->config, "asm.lines", 0);
rz_config_set_i (core->config, "asm.dwarf", 0);
if (!is_json_format_disasm) {
@ -3760,7 +3760,7 @@ RZ_API int rz_core_analysis_search(RzCore *core, ut64 from, ut64 to, ut64 ref, i
if (!buf) {
return -1;
}
int ptrdepth = rz_config_get_i (core->config, "anal.ptrdepth");
int ptrdepth = rz_config_get_i (core->config, "analysis.ptrdepth");
int i, count = 0;
RzAnalysisOp op = RZ_EMPTY;
ut64 at;
@ -3810,7 +3810,7 @@ RZ_API int rz_core_analysis_search(RzCore *core, ut64 from, ut64 to, ut64 ref, i
(!bckwrds && i < core->blocksize - OPSZ) ||
(bckwrds && i > 0);
bckwrds ? i-- : i++) {
// TODO: honor anal.align
// TODO: honor analysis.align
if (rz_cons_is_breaked ()) {
break;
}
@ -3985,7 +3985,7 @@ static bool found_xref(RzCore *core, ut64 at, ut64 xref_to, RzAnalysisRefType ty
RZ_API int rz_core_analysis_search_xrefs(RzCore *core, ut64 from, ut64 to, int rad) {
int cfg_debug = rz_config_get_i (core->config, "cfg.debug");
bool cfg_analysis_strings = rz_config_get_i (core->config, "anal.strings");
bool cfg_analysis_strings = rz_config_get_i (core->config, "analysis.strings");
ut64 at;
int count = 0;
const int bsz = 8096;
@ -4141,7 +4141,7 @@ RZ_API int rz_core_analysis_all(RzCore *core) {
RzBinAddr *entry;
RzBinSymbol *symbol;
int depth = core->analysis->opt.depth;
bool analysis_vars = rz_config_get_i (core->config, "anal.vars");
bool analysis_vars = rz_config_get_i (core->config, "analysis.vars");
/* Analyze Functions */
/* Entries */
@ -4236,7 +4236,7 @@ RZ_API int rz_core_analysis_data(RzCore *core, ut64 addr, int count, int depth,
continue;
}
/* rz_analysis_data requires null-terminated buffer according to coverity */
/* but it should not.. so this must be fixed in anal/data.c instead of */
/* but it should not.. so this must be fixed in analysis/data.c instead of */
/* null terminating here */
d = rz_analysis_data (core->analysis, addr + i, buf + i, len - i, wordsize);
str = rz_analysis_data_to_string (d, pal);
@ -5027,9 +5027,9 @@ static inline bool get_next_i(IterCtx *ctx, size_t *next_i) {
}
RZ_API void rz_core_analysis_esil(RzCore *core, const char *str, const char *target) {
bool cfg_analysis_strings = rz_config_get_i (core->config, "anal.strings");
bool cfg_analysis_strings = rz_config_get_i (core->config, "analysis.strings");
bool emu_lazy = rz_config_get_i (core->config, "emu.lazy");
bool gp_fixed = rz_config_get_i (core->config, "anal.gpfixed");
bool gp_fixed = rz_config_get_i (core->config, "analysis.gpfixed");
RzAnalysisEsil *ESIL = core->analysis->esil;
ut64 refptr = 0LL;
const char *pcname;
@ -5151,7 +5151,7 @@ RZ_API void rz_core_analysis_esil(RzCore *core, const char *str, const char *tar
archIsArm = true;
}
ut64 gp = rz_config_get_i (core->config, "anal.gp");
ut64 gp = rz_config_get_i (core->config, "analysis.gp");
const char *gp_reg = NULL;
if (!strcmp (core->analysis->cur->arch, "mips")) {
gp_reg = "gp";
@ -5477,9 +5477,9 @@ static bool stringAt(RzCore *core, ut64 addr) {
RZ_API int rz_core_search_value_in_range(RzCore *core, RzInterval search_itv, ut64 vmin,
ut64 vmax, int vsize, inRangeCb cb, void *cb_user) {
int i, align = core->search->align, hitctr = 0;
bool vinfun = rz_config_get_i (core->config, "anal.vinfun");
bool vinfunr = rz_config_get_i (core->config, "anal.vinfunrange");
bool analStrings = rz_config_get_i (core->config, "anal.strings");
bool vinfun = rz_config_get_i (core->config, "analysis.vinfun");
bool vinfunr = rz_config_get_i (core->config, "analysis.vinfunrange");
bool analStrings = rz_config_get_i (core->config, "analysis.strings");
mycore = core;
ut8 buf[4096];
ut64 v64, value = 0, size;
@ -5751,9 +5751,9 @@ static int __addrs_cmp(void *_a, void *_b) {
RZ_API void rz_core_analysis_inflags(RzCore *core, const char *glob) {
RzList *addrs = rz_list_newf (free);
RzListIter *iter;
bool a2f = rz_config_get_i (core->config, "anal.a2f");
char *analysis_in = strdup (rz_config_get (core->config, "anal.in"));
rz_config_set (core->config, "anal.in", "block");
bool a2f = rz_config_get_i (core->config, "analysis.a2f");
char *analysis_in = strdup (rz_config_get (core->config, "analysis.in"));
rz_config_set (core->config, "analysis.in", "block");
// aaFa = use a2f instead of af+
bool simple = (!glob || *glob != 'a');
glob = rz_str_trim_head_ro (glob);
@ -5805,7 +5805,7 @@ RZ_API void rz_core_analysis_inflags(RzCore *core, const char *glob) {
}
}
rz_list_free (addrs);
rz_config_set (core->config, "anal.in", analysis_in);
rz_config_set (core->config, "analysis.in", analysis_in);
free (analysis_in);
}

View file

@ -335,11 +335,11 @@ RZ_API int rz_core_bin_set_env(RzCore *r, RzBinFile *binfile) {
r->dbg->bp->baddr = baseaddr;
rz_config_set (r->config, "asm.arch", arch);
rz_config_set_i (r->config, "asm.bits", bits);
rz_config_set (r->config, "anal.arch", arch);
rz_config_set (r->config, "analysis.arch", arch);
if (info->cpu && *info->cpu) {
rz_config_set (r->config, "anal.cpu", info->cpu);
rz_config_set (r->config, "analysis.cpu", info->cpu);
} else {
rz_config_set (r->config, "anal.cpu", arch);
rz_config_set (r->config, "analysis.cpu", arch);
}
rz_asm_use (r->rasm, arch);
rz_core_bin_info (r, RZ_CORE_BIN_ACC_ALL, RZ_MODE_SET, va, NULL, NULL);
@ -692,7 +692,7 @@ RZ_API void rz_core_analysis_type_init(RzCore *core) {
Sdb *types = core->analysis->sdb_types;
// make sure they are empty this is initializing
sdb_reset (types);
const char *analysis_arch = rz_config_get (core->config, "anal.arch");
const char *analysis_arch = rz_config_get (core->config, "analysis.arch");
const char *os = rz_config_get (core->config, "asm.os");
// spaguetti ahead
@ -739,7 +739,7 @@ RZ_API void rz_core_analysis_type_init(RzCore *core) {
RZ_API void rz_core_analysis_cc_init(RzCore *core) {
const char *dir_prefix = rz_config_get (core->config, "dir.prefix");
const char *analysis_arch = rz_config_get (core->config, "anal.arch");
const char *analysis_arch = rz_config_get (core->config, "analysis.arch");
int bits = core->analysis->bits;
Sdb *cc = core->analysis->sdb_cc;
@ -815,9 +815,9 @@ static int bin_info(RzCore *r, int mode, ut64 laddr) {
}
rz_config_set (r->config, "asm.os", info->os);
if (info->rclass && !strcmp (info->rclass, "pe")) {
rz_config_set (r->config, "anal.cpp.abi", "msvc");
rz_config_set (r->config, "analysis.cpp.abi", "msvc");
} else {
rz_config_set (r->config, "anal.cpp.abi", "itanium");
rz_config_set (r->config, "analysis.cpp.abi", "itanium");
}
rz_config_set (r->config, "asm.arch", info->arch);
if (info->cpu && *info->cpu) {
@ -826,7 +826,7 @@ static int bin_info(RzCore *r, int mode, ut64 laddr) {
if (info->features && *info->features) {
rz_config_set (r->config, "asm.features", info->features);
}
rz_config_set (r->config, "anal.arch", info->arch);
rz_config_set (r->config, "analysis.arch", info->arch);
snprintf (str, RZ_FLAG_NAME_SIZE, "%i", info->bits);
rz_config_set (r->config, "asm.bits", str);
rz_config_set (r->config, "asm.dwarf",
@ -839,7 +839,7 @@ static int bin_info(RzCore *r, int mode, ut64 laddr) {
rz_core_analysis_type_init (r);
rz_core_analysis_cc_init (r);
if (info->default_cc && rz_analysis_cc_exist (r->analysis, info->default_cc)) {
rz_core_cmdf (r, "k anal/cc/default.cc=%s", info->default_cc);
rz_core_cmdf (r, "k analysis/cc/default.cc=%s", info->default_cc);
}
} else if (IS_MODE_SIMPLE (mode)) {
rz_cons_printf ("arch %s\n", info->arch);
@ -889,7 +889,7 @@ static int bin_info(RzCore *r, int mode, ut64 laddr) {
rz_cons_printf ("e asm.cpu=%s\n", info->cpu);
}
if (info->default_cc) {
rz_cons_printf ("k anal/cc/default.cc=%s", info->default_cc);
rz_cons_printf ("k analysis/cc/default.cc=%s", info->default_cc);
}
v = rz_analysis_archinfo (r->analysis, RZ_ANALYSIS_ARCHINFO_ALIGN);
if (v != -1) {
@ -4175,7 +4175,7 @@ RZ_API int rz_core_bin_info(RzCore *core, int action, int mode, int va, RzCoreBi
// use our internal values for va
va = va ? VA_TRUE : VA_FALSE;
#if 0
if (rz_config_get_i (core->config, "anal.strings")) {
if (rz_config_get_i (core->config, "analysis.strings")) {
rz_core_cmd0 (core, "aar");
}
#endif

View file

@ -378,9 +378,9 @@ static bool cb_analarch(void *user, void *data) {
}
const char *aa = rz_config_get (core->config, "asm.arch");
if (!aa || strcmp (aa, node->value)) {
eprintf ("anal.arch: cannot find '%s'\n", node->value);
eprintf ("analysis.arch: cannot find '%s'\n", node->value);
} else {
rz_config_set (core->config, "anal.arch", "null");
rz_config_set (core->config, "analysis.arch", "null");
return true;
}
}
@ -528,7 +528,7 @@ static bool cb_asmcpu(void *user, void *data) {
return 0;
}
rz_asm_set_cpu (core->rasm, node->value);
rz_config_set (core->config, "anal.cpu", node->value);
rz_config_set (core->config, "analysis.cpu", node->value);
return true;
}
@ -628,16 +628,16 @@ static bool cb_asmarch(void *user, void *data) {
//rz_debug_set_arch (core->dbg, rz_sys_arch_id (node->value), bits);
rz_debug_set_arch (core->dbg, node->value, bits);
if (!rz_config_set (core->config, "anal.arch", node->value)) {
if (!rz_config_set (core->config, "analysis.arch", node->value)) {
char *p, *s = strdup (node->value);
if (s) {
p = strchr (s, '.');
if (p) {
*p = 0;
}
if (!rz_config_set (core->config, "anal.arch", s)) {
/* fall back to the anal.null plugin */
rz_config_set (core->config, "anal.arch", "null");
if (!rz_config_set (core->config, "analysis.arch", s)) {
/* fall back to the analysis.null plugin */
rz_config_set (core->config, "analysis.arch", "null");
}
free (s);
}
@ -680,8 +680,8 @@ static bool cb_asmarch(void *user, void *data) {
}
}
/* reload types and cc info */
// changing asm.arch changes anal.arch
// changing anal.arch sets types db
// changing asm.arch changes analysis.arch
// changing analysis.arch sets types db
// so ressetting is redundant and may lead to bugs
// 1 case this is usefull is when sdb_types is null
if (!core->analysis || !core->analysis->sdb_types) {
@ -2546,15 +2546,15 @@ static bool cb_searchin(void *user, void *data) {
"dbg.map search in current memory map\n"
"dbg.maps search in all memory maps\n"
"dbg.maps.[rwx] search in all executable marked memory maps\n"
"anal.fcn search in the current function\n"
"anal.bb search in the current basic-block\n");
"analysis.fcn search in the current function\n"
"analysis.bb search in the current basic-block\n");
} else {
print_node_options (node);
}
return false;
}
// Set anal.noncode if exec bit set in anal.in
if (rz_str_startswith (node->name, "anal")) {
// Set analysis.noncode if exec bit set in analysis.in
if (rz_str_startswith (node->name, "analysis")) {
core->analysis->opt.noncode = (strchr (node->value, 'x') == NULL);
}
return true;
@ -2585,10 +2585,10 @@ static bool cb_analysis_gp(RzCore *core, RzConfigNode *node) {
}
static bool cb_analysis_from(RzCore *core, RzConfigNode *node) {
if (rz_config_get_i (core->config, "anal.limits")) {
if (rz_config_get_i (core->config, "analysis.limits")) {
rz_analysis_set_limits (core->analysis,
rz_config_get_i (core->config, "anal.from"),
rz_config_get_i (core->config, "anal.to"));
rz_config_get_i (core->config, "analysis.from"),
rz_config_get_i (core->config, "analysis.to"));
}
return true;
}
@ -2597,8 +2597,8 @@ static bool cb_analysis_limits(void *user, RzConfigNode *node) {
RzCore *core = (RzCore*)user;
if (node->i_value) {
rz_analysis_set_limits (core->analysis,
rz_config_get_i (core->config, "anal.from"),
rz_config_get_i (core->config, "anal.to"));
rz_config_get_i (core->config, "analysis.from"),
rz_config_get_i (core->config, "analysis.to"));
} else {
rz_analysis_unset_limits (core->analysis);
}
@ -2712,7 +2712,7 @@ static bool cb_analysis_cpp_abi(void *user, void *data) {
core->analysis->cpp_abi = RZ_ANALYSIS_CPP_ABI_MSVC;
return true;
}
eprintf ("anal.cpp.abi: cannot find '%s'\n", node->value);
eprintf ("analysis.cpp.abi: cannot find '%s'\n", node->value);
}
return false;
}
@ -2885,82 +2885,82 @@ RZ_API int rz_core_config_init(RzCore *core) {
SETI ("pdb.autoload", false, "Automatically load the required pdb files for loaded DLLs");
/* analysis */
SETBPREF ("anal.detectwrites", "false", "Automatically reanalyze function after a write");
SETPREF ("anal.fcnprefix", "fcn", "Prefix new function names with this");
SETCB ("anal.verbose", "false", &cb_analverbose, "Show RzAnalysis warnings when analyzing code");
SETBPREF ("anal.a2f", "false", "Use the new WIP analysis algorithm (core/p/a2f), anal.depth ignored atm");
SETCB ("anal.roregs", "gp,zero", (RzConfigCallback)&cb_analysis_roregs, "Comma separated list of register names to be readonly");
SETICB ("anal.gp", 0, (RzConfigCallback)&cb_analysis_gp, "Set the value of the GP register (MIPS)");
SETBPREF ("anal.gpfixed", "true", "Set gp register to anal.gp before emulating each instruction in aae");
SETCB ("anal.limits", "false", (RzConfigCallback)&cb_analysis_limits, "Restrict analysis to address range [anal.from:anal.to]");
SETCB ("anal.rnr", "false", (RzConfigCallback)&cb_analysis_rnr, "Recursive no return checks (EXPERIMENTAL)");
SETCB ("anal.limits", "false", (RzConfigCallback)&cb_analysis_limits, "Restrict analysis to address range [anal.from:anal.to]");
SETICB ("anal.from", -1, (RzConfigCallback)&cb_analysis_from, "Lower limit on the address range for analysis");
SETICB ("anal.to", -1, (RzConfigCallback)&cb_analysis_from, "Upper limit on the address range for analysis");
n = NODECB ("anal.in", "io.maps.x", &cb_searchin);
SETBPREF ("analysis.detectwrites", "false", "Automatically reanalyze function after a write");
SETPREF ("analysis.fcnprefix", "fcn", "Prefix new function names with this");
SETCB ("analysis.verbose", "false", &cb_analverbose, "Show RzAnalysis warnings when analyzing code");
SETBPREF ("analysis.a2f", "false", "Use the new WIP analysis algorithm (core/p/a2f), analysis.depth ignored atm");
SETCB ("analysis.roregs", "gp,zero", (RzConfigCallback)&cb_analysis_roregs, "Comma separated list of register names to be readonly");
SETICB ("analysis.gp", 0, (RzConfigCallback)&cb_analysis_gp, "Set the value of the GP register (MIPS)");
SETBPREF ("analysis.gpfixed", "true", "Set gp register to analysis.gp before emulating each instruction in aae");
SETCB ("analysis.limits", "false", (RzConfigCallback)&cb_analysis_limits, "Restrict analysis to address range [analysis.from:analysis.to]");
SETCB ("analysis.rnr", "false", (RzConfigCallback)&cb_analysis_rnr, "Recursive no return checks (EXPERIMENTAL)");
SETCB ("analysis.limits", "false", (RzConfigCallback)&cb_analysis_limits, "Restrict analysis to address range [analysis.from:analysis.to]");
SETICB ("analysis.from", -1, (RzConfigCallback)&cb_analysis_from, "Lower limit on the address range for analysis");
SETICB ("analysis.to", -1, (RzConfigCallback)&cb_analysis_from, "Upper limit on the address range for analysis");
n = NODECB ("analysis.in", "io.maps.x", &cb_searchin);
SETDESC (n, "Specify search boundaries for analysis");
SETOPTIONS (n, "range", "block",
"bin.segment", "bin.segments", "bin.segments.x", "bin.segments.r", "bin.section", "bin.sections", "bin.sections.rwx", "bin.sections.r", "bin.sections.rw", "bin.sections.rx", "bin.sections.wx", "bin.sections.x",
"io.map", "io.maps", "io.maps.rwx", "io.maps.r", "io.maps.rw", "io.maps.rx", "io.maps.wx", "io.maps.x",
"dbg.stack", "dbg.heap",
"dbg.map", "dbg.maps", "dbg.maps.rwx", "dbg.maps.r", "dbg.maps.rw", "dbg.maps.rx", "dbg.maps.wx", "dbg.maps.x",
"anal.fcn", "anal.bb",
"analysis.fcn", "analysis.bb",
NULL);
SETI ("anal.timeout", 0, "Stop analyzing after a couple of seconds");
SETCB ("anal.jmp.retpoline", "true", &cb_analysis_jmpretpoline, "Analyze retpolines, may be slower if not needed");
SETICB ("anal.jmp.tailcall", 0, &cb_analysis_jmptailcall, "Consume a branch as a call if delta is big");
SETI ("analysis.timeout", 0, "Stop analyzing after a couple of seconds");
SETCB ("analysis.jmp.retpoline", "true", &cb_analysis_jmpretpoline, "Analyze retpolines, may be slower if not needed");
SETICB ("analysis.jmp.tailcall", 0, &cb_analysis_jmptailcall, "Consume a branch as a call if delta is big");
SETCB ("anal.armthumb", "false", &cb_analarmthumb, "aae computes arm/thumb changes (lot of false positives ahead)");
SETCB ("anal.jmp.after", "true", &cb_analafterjmp, "Continue analysis after jmp/ujmp");
SETCB ("anal.endsize", "true", &cb_analysis_endsize, "Adjust function size at the end of the analysis (known to be buggy)");
SETCB ("anal.delay", "true", &cb_analysis_delay, "Enable delay slot analysis if supported by the architecture");
SETICB ("anal.depth", 64, &cb_analdepth, "Max depth at code analysis"); // XXX: warn if depth is > 50 .. can be problematic
SETICB ("anal.graph_depth", 256, &cb_analgraphdepth, "Max depth for path search");
SETICB ("anal.sleep", 0, &cb_analsleep, "Sleep N usecs every so often during analysis. Avoid 100% CPU usage");
SETCB ("anal.ignbithints", "false", &cb_analysis_ignbithints, "Ignore the ahb hints (only obey asm.bits)");
SETBPREF ("anal.calls", "false", "Make basic af analysis walk into calls");
SETBPREF ("anal.autoname", "false", "Speculatively set a name for the functions, may result in some false positives");
SETBPREF ("anal.hasnext", "false", "Continue analysis after each function");
SETICB ("anal.nonull", 0, &cb_analysis_nonull, "Do not analyze regions of N null bytes");
SETBPREF ("anal.esil", "false", "Use the new ESIL code analysis");
SETCB ("anal.strings", "false", &cb_analstrings, "Identify and register strings during analysis (aar only)");
SETPREF ("anal.types.spec", "gcc", "Set profile for specifying format chars used in type analysis");
SETBPREF ("anal.types.verbose", "false", "Verbose output from type analysis");
SETBPREF ("anal.types.constraint", "false", "Enable constraint types analysis for variables");
SETCB ("anal.vars", "true", &cb_analvars, "Analyze local variables and arguments");
SETCB ("anal.vars.stackname", "false", &cb_analvars_stackname, "Name variables based on their offset on the stack");
SETBPREF ("anal.vinfun", "true", "Search values in functions (aav) (false by default to only find on non-code)");
SETBPREF ("anal.vinfunrange", "false", "Search values outside function ranges (requires anal.vinfun=false)\n");
SETCB ("anal.norevisit", "false", &cb_analnorevisit, "Do not visit function analysis twice (EXPERIMENTAL)");
SETCB ("anal.nopskip", "true", &cb_analnopskip, "Skip nops at the beginning of functions");
SETCB ("anal.hpskip", "false", &cb_analhpskip, "Skip `mov reg, reg` and `lea reg, [reg] at the beginning of functions");
n = NODECB ("anal.arch", RZ_SYS_ARCH, &cb_analarch);
SETCB ("analysis.armthumb", "false", &cb_analarmthumb, "aae computes arm/thumb changes (lot of false positives ahead)");
SETCB ("analysis.jmp.after", "true", &cb_analafterjmp, "Continue analysis after jmp/ujmp");
SETCB ("analysis.endsize", "true", &cb_analysis_endsize, "Adjust function size at the end of the analysis (known to be buggy)");
SETCB ("analysis.delay", "true", &cb_analysis_delay, "Enable delay slot analysis if supported by the architecture");
SETICB ("analysis.depth", 64, &cb_analdepth, "Max depth at code analysis"); // XXX: warn if depth is > 50 .. can be problematic
SETICB ("analysis.graph_depth", 256, &cb_analgraphdepth, "Max depth for path search");
SETICB ("analysis.sleep", 0, &cb_analsleep, "Sleep N usecs every so often during analysis. Avoid 100% CPU usage");
SETCB ("analysis.ignbithints", "false", &cb_analysis_ignbithints, "Ignore the ahb hints (only obey asm.bits)");
SETBPREF ("analysis.calls", "false", "Make basic af analysis walk into calls");
SETBPREF ("analysis.autoname", "false", "Speculatively set a name for the functions, may result in some false positives");
SETBPREF ("analysis.hasnext", "false", "Continue analysis after each function");
SETICB ("analysis.nonull", 0, &cb_analysis_nonull, "Do not analyze regions of N null bytes");
SETBPREF ("analysis.esil", "false", "Use the new ESIL code analysis");
SETCB ("analysis.strings", "false", &cb_analstrings, "Identify and register strings during analysis (aar only)");
SETPREF ("analysis.types.spec", "gcc", "Set profile for specifying format chars used in type analysis");
SETBPREF ("analysis.types.verbose", "false", "Verbose output from type analysis");
SETBPREF ("analysis.types.constraint", "false", "Enable constraint types analysis for variables");
SETCB ("analysis.vars", "true", &cb_analvars, "Analyze local variables and arguments");
SETCB ("analysis.vars.stackname", "false", &cb_analvars_stackname, "Name variables based on their offset on the stack");
SETBPREF ("analysis.vinfun", "true", "Search values in functions (aav) (false by default to only find on non-code)");
SETBPREF ("analysis.vinfunrange", "false", "Search values outside function ranges (requires analysis.vinfun=false)\n");
SETCB ("analysis.norevisit", "false", &cb_analnorevisit, "Do not visit function analysis twice (EXPERIMENTAL)");
SETCB ("analysis.nopskip", "true", &cb_analnopskip, "Skip nops at the beginning of functions");
SETCB ("analysis.hpskip", "false", &cb_analhpskip, "Skip `mov reg, reg` and `lea reg, [reg] at the beginning of functions");
n = NODECB ("analysis.arch", RZ_SYS_ARCH, &cb_analarch);
SETDESC (n, "Select the architecture to use");
update_analarch_options (core, n);
SETCB ("anal.cpu", RZ_SYS_ARCH, &cb_analcpu, "Specify the anal.cpu to use");
SETPREF ("anal.prelude", "", "Specify an hexpair to find preludes in code");
SETCB ("anal.recont", "false", &cb_analrecont, "End block after splitting a basic block instead of error"); // testing
SETCB ("anal.jmp.indir", "false", &cb_analijmp, "Follow the indirect jumps in function analysis"); // testing
SETI ("anal.ptrdepth", 3, "Maximum number of nested pointers to follow in analysis");
SETCB ("analysis.cpu", RZ_SYS_ARCH, &cb_analcpu, "Specify the analysis.cpu to use");
SETPREF ("analysis.prelude", "", "Specify an hexpair to find preludes in code");
SETCB ("analysis.recont", "false", &cb_analrecont, "End block after splitting a basic block instead of error"); // testing
SETCB ("analysis.jmp.indir", "false", &cb_analijmp, "Follow the indirect jumps in function analysis"); // testing
SETI ("analysis.ptrdepth", 3, "Maximum number of nested pointers to follow in analysis");
SETICB ("asm.lines.maxref", 0, &cb_analmaxrefs, "Maximum number of reflines to be analyzed and displayed in asm.lines with pd");
SETCB ("anal.jmp.tbl", "true", &cb_analysis_jmptbl, "Analyze jump tables in switch statements");
SETCB ("analysis.jmp.tbl", "true", &cb_analysis_jmptbl, "Analyze jump tables in switch statements");
SETCB ("anal.jmp.cref", "false", &cb_analysis_cjmpref, "Create references for conditional jumps");
SETCB ("anal.jmp.ref", "true", &cb_analysis_jmpref, "Create references for unconditional jumps");
SETCB ("analysis.jmp.cref", "false", &cb_analysis_cjmpref, "Create references for conditional jumps");
SETCB ("analysis.jmp.ref", "true", &cb_analysis_jmpref, "Create references for unconditional jumps");
SETCB ("anal.jmp.above", "true", &cb_analysis_jmpabove, "Jump above function pointer");
SETCB ("anal.loads", "false", &cb_analysis_loads, "Define as dword/string/qword when analyzing load instructions");
SETCB ("anal.datarefs", "false", &cb_analysis_followdatarefs, "Follow data references for code coverage");
SETCB ("anal.brokenrefs", "false", &cb_analysis_brokenrefs, "Follow function references as well if function analysis was failed");
SETCB ("anal.jmp.mid", "true", &cb_analysis_jmpmid, "Continue analysis after jump to middle of instruction (x86 only)");
SETCB ("analysis.jmp.above", "true", &cb_analysis_jmpabove, "Jump above function pointer");
SETCB ("analysis.loads", "false", &cb_analysis_loads, "Define as dword/string/qword when analyzing load instructions");
SETCB ("analysis.datarefs", "false", &cb_analysis_followdatarefs, "Follow data references for code coverage");
SETCB ("analysis.brokenrefs", "false", &cb_analysis_brokenrefs, "Follow function references as well if function analysis was failed");
SETCB ("analysis.jmp.mid", "true", &cb_analysis_jmpmid, "Continue analysis after jump to middle of instruction (x86 only)");
SETCB ("anal.refstr", "false", &cb_analysis_searchstringrefs, "Search string references in data references");
SETCB ("anal.trycatch", "false", &cb_analysis_trycatch, "Honor try.X.Y.{from,to,catch} flags");
SETCB ("anal.bb.maxsize", "512K", &cb_analysis_bb_max_size, "Maximum basic block size");
SETCB ("anal.pushret", "false", &cb_analysis_pushret, "Analyze push+ret as jmp");
SETCB ("analysis.refstr", "false", &cb_analysis_searchstringrefs, "Search string references in data references");
SETCB ("analysis.trycatch", "false", &cb_analysis_trycatch, "Honor try.X.Y.{from,to,catch} flags");
SETCB ("analysis.bb.maxsize", "512K", &cb_analysis_bb_max_size, "Maximum basic block size");
SETCB ("analysis.pushret", "false", &cb_analysis_pushret, "Analyze push+ret as jmp");
n = NODECB ("anal.cpp.abi", "itanium", &cb_analysis_cpp_abi);
n = NODECB ("analysis.cpp.abi", "itanium", &cb_analysis_cpp_abi);
SETDESC (n, "Select C++ ABI (Compiler)");
SETOPTIONS (n, "itanium", "msvc", NULL);
@ -3124,7 +3124,7 @@ RZ_API int rz_core_config_init(RzCore *core) {
SETBPREF ("asm.cmt.fold", "false", "Fold comments, toggle with Vz");
SETBPREF ("asm.family", "false", "Show family name in disasm");
SETBPREF ("asm.symbol", "false", "Show symbol+delta instead of absolute offset");
SETBPREF ("asm.anal", "false", "Analyze code and refs while disassembling (see anal.strings)");
SETBPREF ("asm.analysis", "false", "Analyze code and refs while disassembling (see analysis.strings)");
SETI ("asm.symbol.col", 40, "Columns width to show asm.section");
SETCB ("asm.assembler", "", &cb_asmassembler, "Set the plugin name to use when assembling");
SETBPREF ("asm.minicols", "false", "Only show the instruction in the column disasm");
@ -3327,7 +3327,7 @@ RZ_API int rz_core_config_init(RzCore *core) {
SETCB ("dbg.forks", "false", &cb_dbg_forks, "Stop execution if fork() is done (see dbg.threads)");
n = NODECB ("dbg.btalgo", "fuzzy", &cb_dbg_btalgo);
SETDESC (n, "Select backtrace algorithm");
SETOPTIONS (n, "default", "fuzzy", "anal", "trace", NULL);
SETOPTIONS (n, "default", "fuzzy", "analysis", "trace", NULL);
SETCB ("dbg.threads", "false", &cb_stopthreads, "Stop all threads when debugger breaks (see dbg.forks)");
SETCB ("dbg.clone", "false", &cb_dbg_clone, "Stop execution if new thread is created");
SETCB ("dbg.aftersyscall", "true", &cb_dbg_aftersc, "Stop execution before the syscall is executed (see dcs)");
@ -3351,7 +3351,7 @@ RZ_API int rz_core_config_init(RzCore *core) {
rz_config_set_i (cfg, "dbg.follow", 32);
}
rz_config_desc (cfg, "dbg.follow", "Follow program counter when pc > core->offset + dbg.follow");
SETBPREF ("dbg.rebase", "true", "Rebase anal/meta/comments/flags when reopening file in debugger");
SETBPREF ("dbg.rebase", "true", "Rebase analysis/meta/comments/flags when reopening file in debugger");
SETCB ("dbg.swstep", "false", &cb_swstep, "Force use of software steps (code analysis+breakpoint)");
SETBPREF ("dbg.trace.inrange", "false", "While tracing, avoid following calls outside specified range");
SETBPREF ("dbg.trace.libs", "true", "Trace library code too");
@ -3637,7 +3637,7 @@ RZ_API int rz_core_config_init(RzCore *core) {
"io.map", "io.maps", "io.maps.rwx", "io.maps.r", "io.maps.rw", "io.maps.rx", "io.maps.wx", "io.maps.x",
"dbg.stack", "dbg.heap",
"dbg.map", "dbg.maps", "dbg.maps.rwx", "dbg.maps.r", "dbg.maps.rw", "dbg.maps.rx", "dbg.maps.wx", "dbg.maps.x",
"anal.fcn", "anal.bb",
"analysis.fcn", "analysis.bb",
NULL);
SETICB ("search.kwidx", 0, &cb_search_kwidx, "Store last search index count");
SETPREF ("search.prefix", "hit", "Prefix name in search hits label");
@ -3713,7 +3713,7 @@ RZ_API int rz_core_config_init(RzCore *core) {
"io.map", "io.maps", "io.maps.rwx", "io.maps.r", "io.maps.rw", "io.maps.rx", "io.maps.wx", "io.maps.x",
"dbg.stack", "dbg.heap",
"dbg.map", "dbg.maps", "dbg.maps.rwx", "dbg.maps.r", "dbg.maps.rw", "dbg.maps.rx", "dbg.maps.wx", "dbg.maps.x",
"anal.fcn", "anal.bb",
"analysis.fcn", "analysis.bb",
NULL);
/* lines */
SETI ("lines.from", 0, "Start address for line seek");

View file

@ -17,13 +17,13 @@ static void loadGP(RzCore *core) {
if (__isMips (core->rasm)) {
ut64 gp = rz_num_math (core->num, "loc._gp");
if (!gp || gp == UT64_MAX) {
rz_config_set (core->config, "anal.roregs", "zero");
rz_config_set (core->config, "analysis.roregs", "zero");
rz_core_cmd0 (core, "10aes@entry0");
rz_config_set (core->config, "anal.roregs", "zero,gp");
rz_config_set (core->config, "analysis.roregs", "zero,gp");
gp = rz_reg_getv (core->analysis->reg, "gp");
}
// eprintf ("[mips] gp: 0x%08"PFMT64x"\n", gp);
rz_config_set_i (core->config, "anal.gp", gp);
rz_config_set_i (core->config, "analysis.gp", gp);
}
}

View file

@ -1112,7 +1112,7 @@ RZ_IPI int rz_cmd_kuery(void *data, const char *input) {
switch (input[0]) {
case 'j':
out = sdb_querys (s, NULL, 0, "anal/**");
out = sdb_querys (s, NULL, 0, "analysis/**");
if (!out) {
rz_cons_println ("No Output from sdb");
break;
@ -1123,7 +1123,7 @@ RZ_IPI int rz_cmd_kuery(void *data, const char *input) {
break;
}
pj_o (pj);
pj_ko (pj, "anal");
pj_ko (pj, "analysis");
pj_ka (pj, "cur_cmd");
while (*out) {
@ -1135,7 +1135,7 @@ RZ_IPI int rz_cmd_kuery(void *data, const char *input) {
pj_s (pj, cur_cmd);
free (next_cmd);
next_cmd = rz_str_newf ("anal/%s/*", cur_cmd);
next_cmd = rz_str_newf ("analysis/%s/*", cur_cmd);
temp_storage = sdb_querys (s, NULL, 0, next_cmd);
if (!temp_storage) {
@ -2470,8 +2470,8 @@ static bool set_tmp_bits(RzCore *core, int bits, char **tmpbits, int *cmd_ignbit
rz_config_set_i (core->config, "asm.bits", bits);
core->fixedbits = true;
// XXX: why?
*cmd_ignbithints = rz_config_get_i (core->config, "anal.ignbithints");
rz_config_set_i (core->config, "anal.ignbithints", 1);
*cmd_ignbithints = rz_config_get_i (core->config, "analysis.ignbithints");
rz_config_set_i (core->config, "analysis.ignbithints", 1);
return true;
}
@ -3363,8 +3363,8 @@ next_arroba:
}
} else {
bool tmpseek = false;
const char *fromvars[] = { "anal.from", "diff.from", "graph.from", "search.from", "zoom.from", NULL };
const char *tovars[] = { "anal.to", "diff.to", "graph.to", "search.to", "zoom.to", NULL };
const char *fromvars[] = { "analysis.from", "diff.from", "graph.from", "search.from", "zoom.from", NULL };
const char *tovars[] = { "analysis.to", "diff.to", "graph.to", "search.to", "zoom.to", NULL };
ut64 curfrom[RZ_ARRAY_SIZE (fromvars) - 1], curto[RZ_ARRAY_SIZE (tovars) - 1];
// "@{A B}"
@ -3374,7 +3374,7 @@ next_arroba:
if (!p) {
eprintf ("Usage: / ABCD @{0x1000 0x3000}\n");
eprintf ("Run command and define the following vars:\n");
eprintf (" (anal|diff|graph|search|zoom).{from,to}\n");
eprintf (" (analysis|diff|graph|search|zoom).{from,to}\n");
free (tmpeval);
free (tmpasm);
free (tmpbits);
@ -3499,7 +3499,7 @@ beach:
*tmpseek = cmd_tmpseek;
}
if (cmd_ignbithints != -1) {
rz_config_set_i (core->config, "anal.ignbithints", cmd_ignbithints);
rz_config_set_i (core->config, "analysis.ignbithints", cmd_ignbithints);
}
return rc;
fail:
@ -4900,9 +4900,9 @@ DEFINE_HANDLE_TS_FCN_AND_SYMBOL(tmp_fromto_command) {
char *from_str = ts_node_handle_arg (state, node, from, 1);
char *to_str = ts_node_handle_arg (state, node, to, 2);
const char *fromvars[] = { "anal.from", "diff.from", "graph.from",
const char *fromvars[] = { "analysis.from", "diff.from", "graph.from",
"io.buffer.from", "lines.from", "search.from", "zoom.from", NULL };
const char *tovars[] = { "anal.to", "diff.to", "graph.to",
const char *tovars[] = { "analysis.to", "diff.to", "graph.to",
"io.buffer.to", "lines.to", "search.to", "zoom.to", NULL };
ut64 from_val = rz_num_math (core->num, from_str);
ut64 to_val = rz_num_math (core->num, to_str);
@ -4963,7 +4963,7 @@ DEFINE_HANDLE_TS_FCN_AND_SYMBOL(tmp_arch_command) {
free (tmpbits);
}
if (cmd_ignbithints != -1) {
rz_config_set_i (core->config, "anal.ignbithints", cmd_ignbithints);
rz_config_set_i (core->config, "analysis.ignbithints", cmd_ignbithints);
}
free (arg_str);
return res;
@ -4985,7 +4985,7 @@ DEFINE_HANDLE_TS_FCN_AND_SYMBOL(tmp_bits_command) {
rz_config_set (core->config, "asm.bits", tmpbits);
core->fixedbits = oldfixedbits;
rz_config_set_i (core->config, "anal.ignbithints", cmd_ignbithints);
rz_config_set_i (core->config, "analysis.ignbithints", cmd_ignbithints);
free (tmpbits);
free (arg_str);

View file

@ -20,7 +20,7 @@ static const char *help_msg_a[] = {
"ad", " [from] [to]", "analyze data pointers to (from-to)",
"ae", "[?] [expr]", "analyze opcode eval expression (see ao)",
"af", "[?]", "analyze Functions",
"aF", "", "same as above, but using anal.depth=1",
"aF", "", "same as above, but using analysis.depth=1",
"ag", "[?] [options]", "draw graphs in various formats",
"ah", "[?]", "analysis hints (force opcode size, ...)",
"ai", " [addr]", "address information (show perms, stack, heap, ...)",
@ -46,8 +46,8 @@ static const char *help_msg_aa[] = {
"aac*", " [len]", "flag function calls without performing a complete analysis",
"aad", " [len]", "analyze data references to code",
"aae", " [len] ([addr])", "analyze references with ESIL (optionally to address)",
"aaf", "[e|r|t] ", "analyze all functions (e anal.hasnext=1;afr @@c:isq) (aafe=aef@@f)",
"aaF", " [sym*]", "set anal.in=block for all the spaces between flags matching glob",
"aaf", "[e|r|t] ", "analyze all functions (e analysis.hasnext=1;afr @@c:isq) (aafe=aef@@f)",
"aaF", " [sym*]", "set analysis.in=block for all the spaces between flags matching glob",
"aaFa", " [sym*]", "same as aaF but uses af/a2f instead of af+/afb+ (slower but more accurate)",
"aai", "[j]", "show info of all analysis parameters",
"aan", "[gr?]", "autoname functions (aang = golang, aanr = noreturn propagation)",
@ -712,7 +712,7 @@ static const char *help_msg_av[] = {
"av", "", "search for vtables in data sections and show results",
"avj", "", "like av, but as json",
"av*", "", "like av, but as rizin commands",
"avr", "[j@addr]", "try to parse RTTI at vtable addr (see anal.cpp.abi)",
"avr", "[j@addr]", "try to parse RTTI at vtable addr (see analysis.cpp.abi)",
"avra", "[j]", "search for vtables and try to parse RTTI at each of them",
"avrr", "", "recover class info from all findable RTTI (see ac)",
"avrD", " [classname]", "demangle a class name from RTTI",
@ -818,7 +818,7 @@ static bool analysis_is_bad_call(RzCore *core, ut64 from, ut64 to, ut64 addr, ut
}
#endif
// function argument types and names into anal/types
// function argument types and names into analysis/types
static void __add_vars_sdb(RzCore *core, RzAnalysisFunction *fcn) {
RzAnalysisFcnVarsCache cache;
rz_analysis_fcn_vars_cache_init (core->analysis, &cache, fcn);
@ -2905,7 +2905,7 @@ static char * getFunctionName (RzCore *core, ut64 off, const char *name, bool pr
if (fcnNeedsPrefix (name) && (!fcnpfx || !*fcnpfx)) {
fcnpfx = "fcn";
} else {
fcnpfx = rz_config_get (core->config, "anal.fcnprefix");
fcnpfx = rz_config_get (core->config, "analysis.fcnprefix");
}
}
if (rz_reg_get (core->analysis->reg, name, -1)) {
@ -2959,7 +2959,7 @@ static void afCc(RzCore *core, const char *input) {
if (fcn) {
ut32 totalCycles = rz_analysis_function_cost (fcn);
// FIXME: This defeats the purpose of the function, but afC is used in project files.
// cf. canal.c
// cf. canalysis.c
rz_cons_printf ("%d\n", totalCycles);
} else {
eprintf ("afCc: Cannot find function\n");
@ -3295,7 +3295,7 @@ static void cmd_afsj(RzCore *core, const char *arg) {
static int cmd_analysis_fcn(RzCore *core, const char *input) {
char i;
rz_cons_break_timeout (rz_config_get_i (core->config, "anal.timeout"));
rz_cons_break_timeout (rz_config_get_i (core->config, "analysis.timeout"));
switch (input[1]) {
case '-': // "af-"
if (!input[2]) {
@ -3396,12 +3396,12 @@ static int cmd_analysis_fcn(RzCore *core, const char *input) {
int depth = 1;
ut64 a, b;
const char *c;
a = rz_config_get_i (core->config, "anal.from");
b = rz_config_get_i (core->config, "anal.to");
c = rz_config_get (core->config, "anal.limits");
rz_config_set_i (core->config, "anal.from", addr);
rz_config_set_i (core->config, "anal.to", addr_end);
rz_config_set (core->config, "anal.limits", "true");
a = rz_config_get_i (core->config, "analysis.from");
b = rz_config_get_i (core->config, "analysis.to");
c = rz_config_get (core->config, "analysis.limits");
rz_config_set_i (core->config, "analysis.from", addr);
rz_config_set_i (core->config, "analysis.to", addr_end);
rz_config_set (core->config, "analysis.limits", "true");
RzAnalysisFunction *fcn = rz_analysis_get_fcn_in (core->analysis, addr, 0);
if (fcn) {
@ -3413,9 +3413,9 @@ static int cmd_analysis_fcn(RzCore *core, const char *input) {
if (fcn) {
rz_analysis_function_resize (fcn, addr_end - addr);
}
rz_config_set_i (core->config, "anal.from", a);
rz_config_set_i (core->config, "anal.to", b);
rz_config_set (core->config, "anal.limits", c? c: "");
rz_config_set_i (core->config, "analysis.from", a);
rz_config_set_i (core->config, "analysis.to", b);
rz_config_set (core->config, "analysis.limits", c? c: "");
}
}
break;
@ -3680,7 +3680,7 @@ static int cmd_analysis_fcn(RzCore *core, const char *input) {
if (fcn) {
char *type = rz_str_newf ("type.%s", input + 4);
if (sdb_exists (core->analysis->sdb_types, type)) {
char *query = rz_str_newf ("anal/types/func.%s.ret=%s", fcn->name, input + 4);
char *query = rz_str_newf ("analysis/types/func.%s.ret=%s", fcn->name, input + 4);
sdb_querys (core->sdb, NULL, 0, query);
free (query);
}
@ -3804,11 +3804,11 @@ static int cmd_analysis_fcn(RzCore *core, const char *input) {
char *argument = strdup (input + 3);
char *cc = argument;
rz_str_trim (cc);
rz_core_cmdf (core, "k anal/cc/default.cc=%s", cc);
rz_core_cmdf (core, "k analysis/cc/default.cc=%s", cc);
rz_analysis_set_reg_profile (core->analysis);
free (argument);
} else {
rz_core_cmd0 (core, "k anal/cc/default.cc");
rz_core_cmd0 (core, "k analysis/cc/default.cc");
}
break;
case 'a': // "afca"
@ -3818,7 +3818,7 @@ static int cmd_analysis_fcn(RzCore *core, const char *input) {
cmd_analysis_fcn_sig (core, input + 3);
break;
case 'k': // "afck"
rz_core_cmd0 (core, "k anal/cc/*");
rz_core_cmd0 (core, "k analysis/cc/*");
break;
case 'l': // "afcl" list all function Calling conventions.
sdb_foreach (core->analysis->sdb_cc, cc_print, NULL);
@ -3901,10 +3901,10 @@ static int cmd_analysis_fcn(RzCore *core, const char *input) {
case 'R': { // "afcR"
/* very slow, but im tired of waiting for having this, so this is the quickest implementation */
int i;
char *cc = rz_core_cmd_str (core, "k anal/cc/default.cc");
char *cc = rz_core_cmd_str (core, "k analysis/cc/default.cc");
rz_str_trim (cc);
for (i = 0; i < 6; i++) {
char *res = rz_core_cmd_strf (core, "k anal/cc/cc.%s.arg%d", cc, i);
char *res = rz_core_cmd_strf (core, "k analysis/cc/cc.%s.arg%d", cc, i);
rz_str_trim_nc (res);
if (*res) {
char *row = rz_core_cmd_strf (core, "drr~%s 0x", res);
@ -4201,8 +4201,8 @@ static int cmd_analysis_fcn(RzCore *core, const char *input) {
case '\0': // "af"
{
char *uaddr = NULL, *name = NULL;
int depth = rz_config_get_i (core->config, "anal.depth");
bool analyze_recursively = rz_config_get_i (core->config, "anal.calls");
int depth = rz_config_get_i (core->config, "analysis.depth");
bool analyze_recursively = rz_config_get_i (core->config, "analysis.calls");
RzAnalysisFunction *fcn = NULL;
ut64 addr = core->offset;
if (input[1] == 'r') {
@ -6756,7 +6756,7 @@ static void cmd_analysis_opcode(RzCore *core, const char *input) {
sdb_foreach (core->rasm->pair, listOpDescriptions, core);
} else if (input[1] == 0) {
int cur = RZ_MAX (core->print->cur, 0);
// XXX: we need cmd_xxx.h (cmd_anal.h)
// XXX: we need cmd_xxx.h (cmd_analysis.h)
core_analysis_bytes (core, core->block + cur, core->blocksize, 1, 'd');
} else if (input[1] == ' ') {
char *d = rz_asm_describe (core->rasm, input + 2);
@ -6923,7 +6923,7 @@ static void cmd_analysis_blocks(RzCore *core, const char *input) {
char *arg = strchr (input, ' ');
rz_cons_break_push (NULL, NULL);
if (!arg) {
RzList *list = rz_core_get_boundaries_prot (core, RZ_PERM_X, NULL, "anal");
RzList *list = rz_core_get_boundaries_prot (core, RZ_PERM_X, NULL, "analysis");
RzListIter *iter;
RzIOMap* map;
if (!list) {
@ -6957,7 +6957,7 @@ ctrl_c:
static void _analysis_calls(RzCore *core, ut64 addr, ut64 addr_end, bool printCommands, bool importsOnly) {
RzAnalysisOp op;
int depth = rz_config_get_i (core->config, "anal.depth");
int depth = rz_config_get_i (core->config, "analysis.depth");
const int addrbytes = core->io->addrbytes;
const int bsz = 4096;
int bufi = 0;
@ -7081,7 +7081,7 @@ static void cmd_analysis_calls(RzCore *core, const char *input, bool printComman
ranges = rz_list_newf ((RzListFree)free);
rz_list_append (ranges, m);
} else {
ranges = rz_core_get_boundaries_prot (core, RZ_PERM_X, NULL, "anal");
ranges = rz_core_get_boundaries_prot (core, RZ_PERM_X, NULL, "analysis");
}
}
rz_cons_break_push (NULL, NULL);
@ -7089,7 +7089,7 @@ static void cmd_analysis_calls(RzCore *core, const char *input, bool printComman
RzListIter *iter;
RzIOMap *map;
rz_list_free (ranges);
ranges = rz_core_get_boundaries_prot (core, 0, NULL, "anal");
ranges = rz_core_get_boundaries_prot (core, 0, NULL, "analysis");
if (ranges) {
rz_list_foreach (ranges, iter, map) {
ut64 addr = map->itv.addr;
@ -7255,8 +7255,8 @@ static void analysis_axg(RzCore *core, const char *input, int level, Sdb *db, in
RzListIter *iter;
RzAnalysisRef *ref;
ut64 addr = core->offset;
bool is_json = opts & RZ_CORE_ANAL_JSON;
bool is_rz = opts & RZ_CORE_ANAL_GRAPHBODY;
bool is_json = opts & RZ_CORE_ANALYSIS_JSON;
bool is_rz = opts & RZ_CORE_ANALYSIS_GRAPHBODY;
if (is_json && !pj) {
return;
}
@ -7518,10 +7518,10 @@ static bool cmd_analysis_refs(RzCore *core, const char *input) {
{
Sdb *db = sdb_new0 ();
if (input[1] == '*') {
analysis_axg (core, input + 2, 0, db, RZ_CORE_ANAL_GRAPHBODY, NULL); // rizin commands
analysis_axg (core, input + 2, 0, db, RZ_CORE_ANALYSIS_GRAPHBODY, NULL); // rizin commands
} else if (input[1] == 'j') {
PJ *pj = pj_new ();
analysis_axg (core, input + 2, 0, db, RZ_CORE_ANAL_JSON, pj);
analysis_axg (core, input + 2, 0, db, RZ_CORE_ANALYSIS_JSON, pj);
rz_cons_printf("%s\n", pj_string (pj));
pj_free (pj);
} else {
@ -8761,14 +8761,14 @@ static void cmd_analysis_graph(RzCore *core, const char *input) {
case 'd': // "agfd"
if (input[2] == 'm') {
rz_core_analysis_graph (core, rz_num_math (core->num, input + 3),
RZ_CORE_ANAL_GRAPHLINES);
RZ_CORE_ANALYSIS_GRAPHLINES);
} else {
rz_core_analysis_graph (core, rz_num_math (core->num, input + 2),
RZ_CORE_ANAL_GRAPHBODY);
RZ_CORE_ANALYSIS_GRAPHBODY);
}
break;
case 'j': // "agfj"
rz_core_analysis_graph (core, rz_num_math (core->num, input + 2), RZ_CORE_ANAL_JSON);
rz_core_analysis_graph (core, rz_num_math (core->num, input + 2), RZ_CORE_ANALYSIS_JSON);
break;
case 'J': { // "agfJ"
// Honor asm.graph=false in json as well
@ -8777,7 +8777,7 @@ static void cmd_analysis_graph(RzCore *core, const char *input) {
const bool o_graph_offset = rz_config_get_i (core->config, "graph.offset");
rz_config_set_i (core->config, "asm.offset", o_graph_offset);
rz_core_analysis_graph (core, rz_num_math (core->num, input + 2),
RZ_CORE_ANAL_JSON | RZ_CORE_ANAL_JSON_FORMAT_DISASM);
RZ_CORE_ANALYSIS_JSON | RZ_CORE_ANALYSIS_JSON_FORMAT_DISASM);
rz_config_hold_restore (hc);
rz_config_hold_free (hc);
break;
@ -8964,7 +8964,7 @@ static void cmd_analysis_graph(RzCore *core, const char *input) {
rz_core_cmdf (core, "agfk%s", input + 1);
break;
case 'l': // "agl"
rz_core_analysis_graph (core, rz_num_math (core->num, input + 1), RZ_CORE_ANAL_GRAPHLINES);
rz_core_analysis_graph (core, rz_num_math (core->num, input + 1), RZ_CORE_ANALYSIS_GRAPHLINES);
break;
case 'a': // "aga"
switch (input[1]) {
@ -8999,24 +8999,24 @@ static void cmd_analysis_graph(RzCore *core, const char *input) {
}
break;
case 'd': {// "agd"
int diff_opt = RZ_CORE_ANAL_GRAPHBODY | RZ_CORE_ANAL_GRAPHDIFF;
int diff_opt = RZ_CORE_ANALYSIS_GRAPHBODY | RZ_CORE_ANALYSIS_GRAPHDIFF;
switch (input[1]) {
case 'j': {
ut64 addr = input[2] ? rz_num_math (core->num, input + 2) : core->offset;
rz_core_gdiff_fcn (core, addr, core->offset);
rz_core_analysis_graph (core, addr, diff_opt | RZ_CORE_ANAL_JSON);
rz_core_analysis_graph (core, addr, diff_opt | RZ_CORE_ANALYSIS_JSON);
break;
}
case 'J': {
ut64 addr = input[2] ? rz_num_math (core->num, input + 2) : core->offset;
rz_core_gdiff_fcn (core, addr, core->offset);
rz_core_analysis_graph (core, addr, diff_opt | RZ_CORE_ANAL_JSON | RZ_CORE_ANAL_JSON_FORMAT_DISASM);
rz_core_analysis_graph (core, addr, diff_opt | RZ_CORE_ANALYSIS_JSON | RZ_CORE_ANALYSIS_JSON_FORMAT_DISASM);
break;
}
case '*': {
ut64 addr = input[2] ? rz_num_math (core->num, input + 2) : core->offset;
rz_core_gdiff_fcn (core, addr, core->offset);
rz_core_analysis_graph (core, addr, diff_opt | RZ_CORE_ANAL_STAR);
rz_core_analysis_graph (core, addr, diff_opt | RZ_CORE_ANALYSIS_STAR);
break;
}
case ' ':
@ -9090,7 +9090,7 @@ RZ_API int rz_core_analysis_refs(RzCore *core, const char *input) {
to = map->addr_end;
}
} else {
RzList *list = rz_core_get_boundaries_prot (core, RZ_PERM_X, NULL, "anal");
RzList *list = rz_core_get_boundaries_prot (core, RZ_PERM_X, NULL, "analysis");
RzListIter *iter;
RzIOMap* map;
if (!list) {
@ -9271,7 +9271,7 @@ static bool archIsThumbable(RzCore *core) {
static void _CbInRangeAav(RzCore *core, ut64 from, ut64 to, int vsize, int count, void *user) {
bool asterisk = user != NULL;
int arch_align = rz_analysis_archinfo (core->analysis, RZ_ANALYSIS_ARCHINFO_ALIGN);
bool vinfun = rz_config_get_i (core->config, "anal.vinfun");
bool vinfun = rz_config_get_i (core->config, "analysis.vinfun");
int searchAlign = rz_config_get_i (core->config, "search.align");
int align = (searchAlign > 0)? searchAlign: arch_align;
if (align > 1) {
@ -9317,14 +9317,14 @@ static void cmd_analysis_aav(RzCore *core, const char *input) {
#define geti(x) rz_config_get_i(core->config, x);
rz_return_if_fail (*input == 'v');
ut64 o_align = geti ("search.align");
const char *analin = rz_config_get (core->config, "anal.in");
const char *analin = rz_config_get (core->config, "analysis.in");
char *tmp = strdup (analin);
bool asterisk = strchr (input, '*');
bool is_debug = rz_config_get_i (core->config, "cfg.debug");
int archAlign = rz_analysis_archinfo (core->analysis, RZ_ANALYSIS_ARCHINFO_ALIGN);
seti ("search.align", archAlign);
rz_config_set (core->config, "anal.in", "io.maps.x");
oldstr = rz_print_rowlog (core->print, "Finding xrefs in noncode section with anal.in=io.maps");
rz_config_set (core->config, "analysis.in", "io.maps.x");
oldstr = rz_print_rowlog (core->print, "Finding xrefs in noncode section with analysis.in=io.maps");
rz_print_rowlog_done (core->print, oldstr);
int vsize = 4; // 32bit dword
@ -9337,7 +9337,7 @@ static void cmd_analysis_aav(RzCore *core, const char *input) {
rz_print_rowlog_done (core->print, oldstr);
rz_cons_break_push (NULL, NULL);
if (is_debug) {
RzList *list = rz_core_get_boundaries_prot (core, 0, "dbg.map", "anal");
RzList *list = rz_core_get_boundaries_prot (core, 0, "dbg.map", "analysis");
RzListIter *iter;
RzIOMap *map;
if (!list) {
@ -9354,7 +9354,7 @@ static void cmd_analysis_aav(RzCore *core, const char *input) {
}
rz_list_free (list);
} else {
RzList *list = rz_core_get_boundaries_prot (core, 0, NULL, "anal");
RzList *list = rz_core_get_boundaries_prot (core, 0, NULL, "analysis");
if (!list) {
goto beach;
}
@ -9397,7 +9397,7 @@ static void cmd_analysis_aav(RzCore *core, const char *input) {
beach:
rz_cons_break_pop ();
// end
rz_config_set (core->config, "anal.in", tmp);
rz_config_set (core->config, "analysis.in", tmp);
free (tmp);
seti ("search.align", o_align);
}
@ -9519,28 +9519,28 @@ static int cmd_analysis_all(RzCore *core, const char *input) {
rz_core_cmd0 (core, "aef@@f");
} else if (input[1] == 'r') {
ut64 cur = core->offset;
bool hasnext = rz_config_get_i (core->config, "anal.hasnext");
bool hasnext = rz_config_get_i (core->config, "analysis.hasnext");
RzListIter *iter;
RzIOMap *map;
RzList *list = rz_core_get_boundaries_prot (core, RZ_PERM_X, NULL, "anal");
RzList *list = rz_core_get_boundaries_prot (core, RZ_PERM_X, NULL, "analysis");
if (!list) {
break;
}
rz_list_foreach (list, iter, map) {
rz_core_seek (core, map->itv.addr, true);
rz_config_set_i (core->config, "anal.hasnext", 1);
rz_config_set_i (core->config, "analysis.hasnext", 1);
rz_core_cmd0 (core, "afr");
rz_config_set_i (core->config, "anal.hasnext", hasnext);
rz_config_set_i (core->config, "analysis.hasnext", hasnext);
}
rz_list_free (list);
rz_core_seek (core, cur, true);
} else if (input[1] == 't') { // "aaft"
cmd_analysis_aaft (core);
} else if (input[1] == 0) { // "aaf"
const bool analHasnext = rz_config_get_i (core->config, "anal.hasnext");
rz_config_set_i (core->config, "anal.hasnext", true);
const bool analHasnext = rz_config_get_i (core->config, "analysis.hasnext");
rz_config_set_i (core->config, "analysis.hasnext", true);
rz_core_cmd0 (core, "afr@@c:isq");
rz_config_set_i (core->config, "anal.hasnext", analHasnext);
rz_config_set_i (core->config, "analysis.hasnext", analHasnext);
} else {
rz_cons_printf ("Usage: aaf[e|r|t] - analyze all functions again\n");
rz_cons_printf (" aafe = aef@@f\n");
@ -9637,7 +9637,7 @@ static int cmd_analysis_all(RzCore *core, const char *input) {
ut64 curseek = core->offset;
oldstr = rz_print_rowlog (core->print, "Analyze all flags starting with sym. and entry0 (aa)");
rz_cons_break_push (NULL, NULL);
rz_cons_break_timeout (rz_config_get_i (core->config, "anal.timeout"));
rz_cons_break_timeout (rz_config_get_i (core->config, "analysis.timeout"));
rz_core_analysis_all (core);
rz_print_rowlog_done (core->print, oldstr);
rz_core_task_yield (&core->tasks);
@ -9671,8 +9671,8 @@ static int cmd_analysis_all(RzCore *core, const char *input) {
rz_core_task_yield (&core->tasks);
}
}
int c = rz_config_get_i (core->config, "anal.calls");
rz_config_set_i (core->config, "anal.calls", 1);
int c = rz_config_get_i (core->config, "analysis.calls");
rz_config_set_i (core->config, "analysis.calls", 1);
rz_core_cmd0 (core, "s $S");
if (rz_cons_is_breaked ()) {
goto jacuzzi;
@ -9717,7 +9717,7 @@ static int cmd_analysis_all(RzCore *core, const char *input) {
rz_core_cmd0 (core, "avrr");
rz_print_rowlog_done (core->print, oldstr);
rz_core_task_yield (&core->tasks);
rz_config_set_i (core->config, "anal.calls", c);
rz_config_set_i (core->config, "analysis.calls", c);
rz_core_task_yield (&core->tasks);
if (rz_cons_is_breaked ()) {
goto jacuzzi;
@ -9736,7 +9736,7 @@ static int cmd_analysis_all(RzCore *core, const char *input) {
goto jacuzzi;
}
}
if (rz_config_get_i (core->config, "anal.autoname")) {
if (rz_config_get_i (core->config, "analysis.autoname")) {
oldstr = rz_print_rowlog (core->print, "Speculatively constructing a function name "
"for fcn.* and sym.func.* functions (aan)");
rz_core_analysis_autoname_all_fcns (core);
@ -9798,7 +9798,7 @@ static int cmd_analysis_all(RzCore *core, const char *input) {
}
oldstr = rz_print_rowlog (core->print, "Enable constraint types analysis for variables");
rz_config_set (core->config, "anal.types.constraint", "true");
rz_config_set (core->config, "analysis.types.constraint", "true");
rz_print_rowlog_done (core->print, oldstr);
}
rz_core_cmd0 (core, "s-");
@ -9869,20 +9869,20 @@ static int cmd_analysis_all(RzCore *core, const char *input) {
ut64 at = core->offset;
RzIOMap *map;
RzListIter *iter;
RzList *list = rz_core_get_boundaries_prot (core, -1, NULL, "anal");
RzList *list = rz_core_get_boundaries_prot (core, -1, NULL, "analysis");
if (!list) {
break;
}
if (!strcmp ("range", rz_config_get (core->config, "anal.in"))) {
ut64 from = rz_config_get_i (core->config, "anal.from");
ut64 to = rz_config_get_i (core->config, "anal.to");
if (!strcmp ("range", rz_config_get (core->config, "analysis.in"))) {
ut64 from = rz_config_get_i (core->config, "analysis.from");
ut64 to = rz_config_get_i (core->config, "analysis.to");
if (to > from) {
char *len = rz_str_newf (" 0x%"PFMT64x, to - from);
rz_core_seek (core, from, true);
rz_core_analysis_esil (core, len, NULL);
free (len);
} else {
eprintf ("Assert: anal.from > anal.to\n");
eprintf ("Assert: analysis.from > analysis.to\n");
}
} else {
rz_list_foreach (list, iter, map) {

View file

@ -1155,7 +1155,7 @@ static void cmd_p_minus_e(RzCore *core, ut64 at, ut64 ate) {
}
static void helpCmdTasks(RzCore *core) {
// TODO: integrate with =h& and bg anal/string/searches/..
// TODO: integrate with =h& and bg analysis/string/searches/..
rz_core_cmd_help (core, help_msg_amper);
}

View file

@ -48,7 +48,7 @@ static const char *help_msg_slash[] = {
"/f", "", "search forwards, (command modifier)",
"/F", " file [off] [sz]", "search contents of file with offset and size",
// TODO: add subcommands to find paths between functions and filter only function names instead of offsets, etc
"/g", "[g] [from]", "find all graph paths A to B (/gg follow jumps, see search.count and anal.depth)",
"/g", "[g] [from]", "find all graph paths A to B (/gg follow jumps, see search.count and analysis.depth)",
"/h", "[t] [hash] [len]", "find block matching this hash. See ph",
"/i", " foo", "search for string 'foo' ignoring case",
"/m", "[?][ebm] magicfile", "search for magic, filesystems or binary headers",
@ -282,7 +282,7 @@ static void cmd_search_bin(RzCore *core, RzInterval itv) {
static int __prelude_cb_hit(RzSearchKeyword *kw, void *user, ut64 addr) {
RzCore *core = (RzCore *) user;
int depth = rz_config_get_i (core->config, "anal.depth");
int depth = rz_config_get_i (core->config, "analysis.depth");
// eprintf ("ap: Found function prelude %d at 0x%08"PFMT64x"\n", preludecnt, addr);
rz_core_analysis_fcn (core, addr, -1, RZ_ANALYSIS_REF_TYPE_NULL, depth);
preludecnt++;
@ -333,10 +333,10 @@ static int count_functions(RzCore *core) {
RZ_API int rz_core_search_preludes(RzCore *core, bool log) {
int ret = -1;
const char *prelude = rz_config_get (core->config, "anal.prelude");
const char *prelude = rz_config_get (core->config, "analysis.prelude");
ut64 from = UT64_MAX;
ut64 to = UT64_MAX;
const char *where = rz_config_get (core->config, "anal.in");
const char *where = rz_config_get (core->config, "analysis.in");
RzList *list = rz_core_get_boundaries_prot (core, RZ_PERM_X, where, "search");
RzListIter *iter;
@ -567,7 +567,7 @@ static void append_bound(RzList *list, RzIO *io, RzInterval search_itv, ut64 fro
map->perm = perms;
RzInterval itv = {from, size};
if (size == -1) {
eprintf ("Warning: Invalid range. Use different search.in=? or anal.in=dbg.maps.x\n");
eprintf ("Warning: Invalid range. Use different search.in=? or analysis.in=dbg.maps.x\n");
free (map);
return;
}
@ -834,14 +834,14 @@ RZ_API RzList *rz_core_get_boundaries_prot(RzCore *core, int perm, const char *m
}
}
}
} else if (!strcmp (mode, "anal.fcn") || !strcmp (mode, "anal.bb")) {
} else if (!strcmp (mode, "analysis.fcn") || !strcmp (mode, "analysis.bb")) {
RzAnalysisFunction *f = rz_analysis_get_fcn_in (core->analysis, core->offset,
RZ_ANALYSIS_FCN_TYPE_FCN | RZ_ANALYSIS_FCN_TYPE_SYM);
if (f) {
ut64 from = f->addr, size = rz_analysis_function_size_from_entry (f);
/* Search only inside the basic block */
if (!strcmp (mode, "anal.bb")) {
if (!strcmp (mode, "analysis.bb")) {
RzListIter *iter;
RzAnalysisBlock *bb;
@ -856,7 +856,7 @@ RZ_API RzList *rz_core_get_boundaries_prot(RzCore *core, int perm, const char *m
}
append_bound (list, core->io, search_itv, from, size, 5);
} else {
eprintf ("WARNING: search.in = ( anal.bb | anal.fcn )"\
eprintf ("WARNING: search.in = ( analysis.bb | analysis.fcn )"\
"requires to seek into a valid function\n");
append_bound (list, core->io, search_itv, core->offset, 1, 5);
}
@ -3709,7 +3709,7 @@ reread:
case 'g': // "/g" graph search
if (input[1] == '?') {
rz_cons_printf ("Usage: /g[g] [fromaddr] @ [toaddr]\n");
rz_cons_printf ("(find all graph paths A to B (/gg follow jumps, see search.count and anal.depth)");
rz_cons_printf ("(find all graph paths A to B (/gg follow jumps, see search.count and analysis.depth)");
} else {
ut64 addr = UT64_MAX;
if (input[1]) {
@ -3722,7 +3722,7 @@ reread:
addr = core->offset;
}
}
const int depth = rz_config_get_i (core->config, "anal.depth");
const int depth = rz_config_get_i (core->config, "analysis.depth");
// Va;ifate input length
if (input[1] != '\0') {
rz_core_analysis_paths (core, addr, core->offset, input[1] == 'g', depth, (input[1] == 'j' || input[2] == 'j'));

View file

@ -252,7 +252,7 @@ static bool addBytesZign(RzCore *core, const char *name, int type, RzList *args)
case RZ_SIGN_BYTES:
retval = rz_sign_add_bytes (core->analysis, name, size, bytes, mask);
break;
case RZ_SIGN_ANAL:
case RZ_SIGN_ANALYSIS:
retval = rz_sign_add_analysis (core->analysis, name, size, bytes, 0);
break;
}
@ -280,7 +280,7 @@ static bool addOffsetZign(RzCore *core, const char *name, RzList *args) {
static bool addZign(RzCore *core, const char *name, int type, RzList *args) {
switch (type) {
case RZ_SIGN_BYTES:
case RZ_SIGN_ANAL:
case RZ_SIGN_ANALYSIS:
return addBytesZign (core, name, type, args);
case RZ_SIGN_GRAPH:
return addGraphZign (core, name, args);
@ -1256,7 +1256,7 @@ RZ_IPI int rz_cmd_zign(void *data, const char *input) {
rz_sign_list (core->analysis, *input);
break;
case 'k': // "zk"
rz_core_cmd0 (core, "k anal/zigns/*");
rz_core_cmd0 (core, "k analysis/zigns/*");
break;
case '-': // "z-"
rz_sign_delete (core->analysis, arg);
@ -1308,7 +1308,7 @@ RZ_IPI RzCmdStatus rz_zign_show_handler(RzCore *core, int argc, const char **arg
rz_sign_list (core->analysis, '*');
return RZ_CMD_STATUS_OK;
case RZ_OUTPUT_MODE_SDB:
out = sdb_querys (core->sdb, NULL, 0, "anal/zigns/*");
out = sdb_querys (core->sdb, NULL, 0, "analysis/zigns/*");
if (!out) {
return RZ_CMD_STATUS_ERROR;
}

View file

@ -1274,10 +1274,10 @@ static void autocomplete_sdb (RzCore *core, RzLineCompletion *completion, const
*p1 = 0;
char *ns = p1 + 1;
p2 = strchr (ns, '/');
if (!p2) { // anal/m
if (!p2) { // analysis/m
char *tmp = p1 + 1;
int n = strlen (tmp);
out = sdb_querys (sdb, NULL, 0, "anal/**");
out = sdb_querys (sdb, NULL, 0, "analysis/**");
if (!out) {
return;
}
@ -1288,19 +1288,19 @@ static void autocomplete_sdb (RzCore *core, RzLineCompletion *completion, const
}
cur_cmd = rz_str_ndup (out, cur_pos - out);
if (!strncmp (tmp, cur_cmd, n)) {
char *cmplt = rz_str_newf ("anal/%s/", cur_cmd);
char *cmplt = rz_str_newf ("analysis/%s/", cur_cmd);
rz_line_completion_push (completion, cmplt);
free (cmplt);
}
out += cur_pos - out + 1;
}
} else { // anal/meta/*
} else { // analysis/meta/*
char *tmp = p2 + 1;
int n = strlen (tmp);
char *spltr = strchr (ns, '/');
*spltr = 0;
next_cmd = rz_str_newf ("anal/%s/*", ns);
next_cmd = rz_str_newf ("analysis/%s/*", ns);
out = sdb_querys (sdb, NULL, 0, next_cmd);
if (!out) {
free (lpath);
@ -1315,7 +1315,7 @@ static void autocomplete_sdb (RzCore *core, RzLineCompletion *completion, const
key = strchr (temp_cmd, '=');
*key = 0;
if (!strncmp (tmp, temp_cmd, n)) {
char *cmplt = rz_str_newf ("anal/%s/%s", ns, temp_cmd);
char *cmplt = rz_str_newf ("analysis/%s/%s", ns, temp_cmd);
rz_line_completion_push (completion, cmplt);
free (cmplt);
}
@ -1324,8 +1324,8 @@ static void autocomplete_sdb (RzCore *core, RzLineCompletion *completion, const
}
} else {
int n = strlen (lpath);
if (!strncmp (lpath, "anal", n)) {
rz_line_completion_push (completion, "anal/");
if (!strncmp (lpath, "analysis", n)) {
rz_line_completion_push (completion, "analysis/");
}
}
}
@ -1875,9 +1875,9 @@ static void update_sdb(RzCore *core) {
if (!core) {
return;
}
//SDB// anal/
//SDB// analysis/
if (core->analysis && core->analysis->sdb) {
sdb_ns_set (DB, "anal", core->analysis->sdb);
sdb_ns_set (DB, "analysis", core->analysis->sdb);
}
//SDB// bin/
if (core->bin && core->bin->sdb) {
@ -2455,7 +2455,7 @@ static int win_eprintf(const char *format, ...) {
static void ev_iowrite_cb(RzEvent *ev, int type, void *user, void *data) {
RzCore *core = user;
RzEventIOWrite *iow = data;
if (rz_config_get_i (core->config, "anal.detectwrites")) {
if (rz_config_get_i (core->config, "analysis.detectwrites")) {
rz_analysis_update_analysis_range (core->analysis, iow->addr, iow->len);
if (core->cons->event_resize && core->cons->event_data) {
// Force a reload of the graph
@ -2571,7 +2571,7 @@ RZ_API bool rz_core_init(RzCore *core) {
core->analysis->cb.on_fcn_delete = on_fcn_delete;
core->analysis->cb.on_fcn_rename = on_fcn_rename;
core->print->sdb_types = core->analysis->sdb_types;
core->rasm->syscall = rz_syscall_ref (core->analysis->syscall); // BIND syscall anal/asm
core->rasm->syscall = rz_syscall_ref (core->analysis->syscall); // BIND syscall analysis/asm
rz_analysis_set_user_ptr (core->analysis, core);
core->analysis->cb_printf = (void *) rz_cons_printf;
core->parser = rz_parse_new ();

View file

@ -612,7 +612,7 @@ static RDisasmState * ds_init(RzCore *core) {
const char *ah = rz_config_get (core->config, "asm.highlight");
ds->asm_highlight = (ah && *ah)? rz_num_math (core->num, ah): UT64_MAX;
}
ds->asm_analysis = rz_config_get_i (core->config, "asm.anal");
ds->asm_analysis = rz_config_get_i (core->config, "asm.analysis");
ds->show_color = rz_config_get_i (core->config, "scr.color");
ds->show_color_bytes = rz_config_get_i (core->config, "scr.color.bytes"); // maybe rename to asm.color.bytes
ds->show_color_args = rz_config_get_i (core->config, "scr.color.args");
@ -4601,8 +4601,8 @@ static void mipsTweak(RDisasmState *ds) {
RzCore *core = ds->core;
const char *asm_arch = rz_config_get (core->config, "asm.arch");
if (asm_arch && *asm_arch && strstr (asm_arch, "mips")) {
if (rz_config_get_i (core->config, "anal.gpfixed")) {
ut64 gp = rz_config_get_i (core->config, "anal.gp");
if (rz_config_get_i (core->config, "analysis.gpfixed")) {
ut64 gp = rz_config_get_i (core->config, "analysis.gp");
rz_reg_setv (core->analysis->reg, "gp", gp);
}
}

View file

@ -99,7 +99,7 @@ RZ_API void rz_core_loadlibs_init(RzCore *core) {
DF (DBG, "debugger plugins", debug);
DF (BP, "debugger breakpoint plugins", bp);
DF (LANG, "language plugins", lang);
DF (ANAL, "analysis plugins", analysis);
DF (ANALYSIS, "analysis plugins", analysis);
DF (ASM, "(dis)assembler plugins", asm);
DF (PARSE, "parsing plugins", parse);
DF (BIN, "bin plugins", bin);

View file

@ -277,7 +277,7 @@ static int analyzeFunction(RzCore *core, ut64 addr) {
ut64 loc_addr = 0;
char *command = NULL;
char *function_label;
bool vars = rz_config_get_i (core->config, "anal.vars");
bool vars = rz_config_get_i (core->config, "analysis.vars");
if (!db) {
eprintf ("Cannot create db\n");
return false;

View file

@ -11,7 +11,7 @@
* /
* /config => see config.c
* /flags => see flag.c
* /analysis => see anal.c
* /analysis => see analysis.c
* /file => see below
* offset=<offset>
* blocksize=<blocksize>
@ -25,7 +25,7 @@ RZ_API void rz_serialize_core_save(RZ_NONNULL Sdb *db, RZ_NONNULL RzCore *core,
file_save (sdb_ns (db, "file", true), core, prj_file);
rz_serialize_config_save (sdb_ns (db, "config", true), core->config);
rz_serialize_flag_save (sdb_ns (db, "flags", true), core->flags);
rz_serialize_analysis_save (sdb_ns (db, "anal", true), core->analysis);
rz_serialize_analysis_save (sdb_ns (db, "analysis", true), core->analysis);
char buf[0x20];
if (snprintf (buf, sizeof (buf), "0x%"PFMT64x, core->offset) < 0) {
@ -50,7 +50,7 @@ RZ_API bool rz_serialize_core_load(RZ_NONNULL Sdb *db, RZ_NONNULL RzCore *core,
}
SUB ("config", rz_serialize_config_load (subdb, core->config, res));
SUB ("flags", rz_serialize_flag_load (subdb, core->flags, res));
SUB ("anal", rz_serialize_analysis_load (subdb, core->analysis, res));
SUB ("analysis", rz_serialize_analysis_load (subdb, core->analysis, res));
const char *str = sdb_get (db, "offset", 0);
if (!str || !*str) {

View file

@ -39,7 +39,7 @@ RZ_API int rz_core_zdiff(RzCore *c, RzCore *c2) {
if (!c || !c2) {
return false;
}
////////// moove this into anal/sign
////////// moove this into analysis/sign
SdbList *a = sdb_foreach_list (c->analysis->sdb_zigns, false);
SdbList *b = sdb_foreach_list (c2->analysis->sdb_zigns, false);

View file

@ -1339,7 +1339,7 @@ RZ_API int rz_debug_continue_until_optype(RzDebug *dbg, int type, int over) {
}
if (!dbg->analysis || !dbg->reg) {
eprintf ("Undefined pointer at dbg->anal\n");
eprintf ("Undefined pointer at dbg->analysis\n");
return false;
}

View file

@ -45,11 +45,11 @@ static RzList *rz_debug_native_frames(RzDebug *dbg, ut64 at) {
if (dbg->btalgo) {
if (!strcmp (dbg->btalgo, "fuzzy")) {
cb = backtrace_fuzzy;
} else if (!strcmp (dbg->btalgo, "anal")) {
} else if (!strcmp (dbg->btalgo, "analysis")) {
if (dbg->bits == RZ_SYS_BITS_64) {
cb = backtrace_x86_64_anal;
cb = backtrace_x86_64_analysis;
} else {
cb = backtrace_x86_32_anal;
cb = backtrace_x86_32_analysis;
}
}
}

View file

@ -53,7 +53,7 @@ static RzList *backtrace_x86_64(RzDebug *dbg, ut64 at) {
return list;
}
// XXX: Do this work correctly?
static RzList *backtrace_x86_64_anal(RzDebug *dbg, ut64 at) {
static RzList *backtrace_x86_64_analysis(RzDebug *dbg, ut64 at) {
int i;
ut8 buf[8];
RzDebugFrame *frame;

View file

@ -1,7 +1,7 @@
/* definition */
//static RzList *backtrace_frames_x86_32(RzDebug *dbg, ut64 at);
//static RzList *backtrace_frames_x86_32_anal(RzDebug *dbg, ut64 at);
//static RzList *backtrace_frames_x86_32_analysis(RzDebug *dbg, ut64 at);
/* implementation */
#include <rz_debug.h>
@ -39,7 +39,7 @@ static RzList *backtrace_x86_32(RzDebug *dbg, ut64 at) {
}
/* TODO: Can I use this as in a coroutine? */
static RzList *backtrace_x86_32_anal(RzDebug *dbg, ut64 at) {
static RzList *backtrace_x86_32_analysis(RzDebug *dbg, ut64 at) {
RzRegItem *ri;
RzReg *reg = dbg->reg;
ut32 i, _esp, esp, eip, ebp2;

View file

@ -616,15 +616,15 @@ typedef struct rz_analysis_hint_cb_t {
} RHintCb;
typedef struct rz_analysis_t {
char *cpu; // anal.cpu
char *cpu; // analysis.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)
RzAnalysisCPPABI cpp_abi; // anal.cpp.abi
int sleep; // analysis.sleep, sleep some usecs before analyzing more (avoid 100% cpu usages)
RzAnalysisCPPABI cpp_abi; // analysis.cpp.abi
void *user;
ut64 gp; // anal.gp, global pointer. used for mips. but can be used by other arches too in the future
ut64 gp; // analysis.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.
RzList *fcns;
HtUP *ht_addr_fun; // address => function
@ -647,14 +647,14 @@ typedef struct rz_analysis_t {
int pcalign; // asm.pcalign
struct rz_analysis_esil_t *esil;
struct rz_analysis_plugin_t *cur;
RzAnalysisRange *limit; // anal.from, anal.to
RzAnalysisRange *limit; // analysis.from, analysis.to
RzList *plugins;
Sdb *sdb_types;
Sdb *sdb_fmts;
Sdb *sdb_zigns;
HtUP *dict_refs;
HtUP *dict_xrefs;
bool recursive_noreturn; // anal.rnr
bool recursive_noreturn; // analysis.rnr
RzSpaces zign_spaces;
char *zign_path; // dir.zigns
PrintfCallback cb_printf;
@ -1525,7 +1525,7 @@ RZ_API bool rz_analysis_function_contains(RzAnalysisFunction *fcn, ut64 addr);
// returns true if function bytes were modified
RZ_API bool rz_analysis_function_was_modified(RzAnalysisFunction *fcn);
/* anal.c */
/* analysis.c */
RZ_API RzAnalysis *rz_analysis_new(void);
RZ_API void rz_analysis_purge(RzAnalysis *analysis);
RZ_API RzAnalysis *rz_analysis_free(RzAnalysis *r);

View file

@ -43,13 +43,13 @@ RZ_LIB_VERSION_HEADER(rz_core);
#define RZ_CORE_BLOCKSIZE 0x100
#define RZ_CORE_BLOCKSIZE_MAX 0x3200000 /* 32MB */
#define RZ_CORE_ANAL_GRAPHLINES 1
#define RZ_CORE_ANAL_GRAPHBODY 2
#define RZ_CORE_ANAL_GRAPHDIFF 4
#define RZ_CORE_ANAL_JSON 8
#define RZ_CORE_ANAL_KEYVALUE 16
#define RZ_CORE_ANAL_JSON_FORMAT_DISASM 32
#define RZ_CORE_ANAL_STAR 64
#define RZ_CORE_ANALYSIS_GRAPHLINES 1
#define RZ_CORE_ANALYSIS_GRAPHBODY 2
#define RZ_CORE_ANALYSIS_GRAPHDIFF 4
#define RZ_CORE_ANALYSIS_JSON 8
#define RZ_CORE_ANALYSIS_KEYVALUE 16
#define RZ_CORE_ANALYSIS_JSON_FORMAT_DISASM 32
#define RZ_CORE_ANALYSIS_STAR 64
#define RZ_FLAGS_FS_CLASSES "classes"
#define RZ_FLAGS_FS_FUNCTIONS "functions"
@ -554,7 +554,7 @@ RZ_API void rz_core_print_func_args(RzCore *core);
RZ_API char *resolve_fcn_name(RzAnalysis *analysis, const char * func_name);
RZ_API int rz_core_get_stacksz(RzCore *core, ut64 from, ut64 to);
/* anal.c */
/* analysis.c */
RZ_API RzAnalysisOp* rz_core_analysis_op(RzCore *core, ut64 addr, int mask);
RZ_API void rz_core_analysis_esil(RzCore *core, const char *str, const char *addr);
RZ_API void rz_core_analysis_fcn_merge(RzCore *core, ut64 addr, ut64 addr2);
@ -701,10 +701,10 @@ RZ_API void rz_core_recover_vars(RzCore *core, RzAnalysisFunction *fcn, bool arg
#define RZ_CORE_PRJ_META 0x0010
#define RZ_CORE_PRJ_XREFS 0x0020
#define RZ_CORE_PRJ_FCNS 0x0040
#define RZ_CORE_PRJ_ANAL_HINTS 0x0080
#define RZ_CORE_PRJ_ANAL_TYPES 0x0100
#define RZ_CORE_PRJ_ANAL_MACROS 0x0200
#define RZ_CORE_PRJ_ANAL_SEEK 0x0400
#define RZ_CORE_PRJ_ANALYSIS_HINTS 0x0080
#define RZ_CORE_PRJ_ANALYSIS_TYPES 0x0100
#define RZ_CORE_PRJ_ANALYSIS_MACROS 0x0200
#define RZ_CORE_PRJ_ANALYSIS_SEEK 0x0400
#define RZ_CORE_PRJ_DBG_BREAK 0x0800
#define RZ_CORE_PRJ_ALL 0xFFFF

View file

@ -70,7 +70,7 @@ enum {
RZ_LIB_TYPE_DBG, /* debugger */
RZ_LIB_TYPE_LANG, /* language */
RZ_LIB_TYPE_ASM, /* assembler */
RZ_LIB_TYPE_ANAL, /* analysis */
RZ_LIB_TYPE_ANALYSIS, /* analysis */
RZ_LIB_TYPE_PARSE, /* parsers */
RZ_LIB_TYPE_BIN, /* bin headers */
RZ_LIB_TYPE_BIN_XTR, /* bin extractors */

View file

@ -22,7 +22,7 @@ typedef enum {
RZ_SIGN_BYTES = 'b', // bytes pattern
RZ_SIGN_BYTES_MASK= 'm', // bytes pattern
RZ_SIGN_BYTES_SIZE= 's', // bytes pattern
RZ_SIGN_ANAL = 'a', // bytes pattern (analysis mask)
RZ_SIGN_ANALYSIS = 'a', // bytes pattern (analysis mask)
RZ_SIGN_COMMENT = 'c', // comment
RZ_SIGN_GRAPH = 'g', // graph metrics
RZ_SIGN_OFFSET = 'o', // addr

View file

@ -511,7 +511,7 @@ static void __load_plugins(RzAsmState *as) {
return;
}
rz_lib_add_handler (as->l, RZ_LIB_TYPE_ASM, "(dis)assembly plugins", &__lib_asm_cb, NULL, as);
rz_lib_add_handler (as->l, RZ_LIB_TYPE_ANAL, "analysis/emulation plugins", &__lib_analysis_cb, NULL, as);
rz_lib_add_handler (as->l, RZ_LIB_TYPE_ANALYSIS, "analysis/emulation plugins", &__lib_analysis_cb, NULL, as);
char *path = rz_sys_getenv (RZ_LIB_ENV);
if (path && *path) {

View file

@ -833,7 +833,7 @@ static char *get_graph_commands(RzCore *c, ut64 off) {
bool tmp_html = rz_cons_singleton ()->is_html;
rz_cons_singleton ()->is_html = false;
rz_cons_push ();
rz_core_analysis_graph (c, off, RZ_CORE_ANAL_GRAPHBODY | RZ_CORE_ANAL_GRAPHDIFF | RZ_CORE_ANAL_STAR);
rz_core_analysis_graph (c, off, RZ_CORE_ANALYSIS_GRAPHBODY | RZ_CORE_ANALYSIS_GRAPHDIFF | RZ_CORE_ANALYSIS_STAR);
const char *static_str = rz_cons_get_buffer ();
char *retstr = strdup (static_str? static_str: "");
rz_cons_pop ();
@ -876,7 +876,7 @@ static void __generate_graph (RzCore *c, ut64 off) {
}
static void __print_diff_graph(RzCore *c, ut64 off, int gmode) {
int opts = RZ_CORE_ANAL_GRAPHBODY | RZ_CORE_ANAL_GRAPHDIFF;
int opts = RZ_CORE_ANALYSIS_GRAPHBODY | RZ_CORE_ANALYSIS_GRAPHDIFF;
int use_utf8 = rz_config_get_i (c->config, "scr.utf8");
rz_agraph_reset(c->graph);
switch (gmode) {
@ -884,7 +884,7 @@ static void __print_diff_graph(RzCore *c, ut64 off, int gmode) {
rz_core_analysis_graph (c, off, opts);
break;
case GRAPH_STAR_MODE:
rz_core_analysis_graph (c, off, opts | RZ_CORE_ANAL_STAR);
rz_core_analysis_graph (c, off, opts | RZ_CORE_ANALYSIS_STAR);
break;
case GRAPH_TINY_MODE:
__generate_graph (c, off);
@ -904,10 +904,10 @@ static void __print_diff_graph(RzCore *c, ut64 off, int gmode) {
rz_core_agraph_print (c, use_utf8, "g");
break;
case GRAPH_JSON_MODE:
rz_core_analysis_graph (c, off, opts | RZ_CORE_ANAL_JSON);
rz_core_analysis_graph (c, off, opts | RZ_CORE_ANALYSIS_JSON);
break;
case GRAPH_JSON_DIS_MODE:
rz_core_analysis_graph (c, off, opts | RZ_CORE_ANAL_JSON | RZ_CORE_ANAL_JSON_FORMAT_DISASM);
rz_core_analysis_graph (c, off, opts | RZ_CORE_ANALYSIS_JSON | RZ_CORE_ANALYSIS_JSON_FORMAT_DISASM);
break;
case GRAPH_DEFAULT_MODE:
default:
@ -1121,7 +1121,7 @@ RZ_API int rz_main_rz_diff(int argc, const char **argv) {
szb = (ut64)strlen ((const char *) bufb);
mode = MODE_DIFF;
} else if (mode == MODE_GRAPH) {
int depth = rz_config_get_i (c->config, "anal.depth");
int depth = rz_config_get_i (c->config, "analysis.depth");
if (depth < 1) {
depth = 64;
}

View file

@ -11,7 +11,7 @@ static bool __has_debug = false;
/* XXX : this must be registered in runtime */
static const char *rz_lib_types[] = {
"io", "dbg", "lang", "asm", "anal", "parse", "bin", "bin_xtr",
"io", "dbg", "lang", "asm", "analysis", "parse", "bin", "bin_xtr",
"bp", "syscall", "fastcall", "crypto", "core", "egg", "fs", NULL
};

View file

@ -1,4 +1,4 @@
Trying to escape from the librz/core mess, we should put all the heap stuff into a separate place and use it from anal/heap.c
Trying to escape from the librz/core mess, we should put all the heap stuff into a separate place and use it from analysis/heap.c
TODO

View file

@ -9,4 +9,4 @@ Main IO function:
tcc_appendf()
Appends sdb queries to be executed from the core anal.
Appends sdb queries to be executed from the core analysis.

Some files were not shown because too many files have changed in this diff Show more