mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-26 07:44:29 +00:00
Kill anal.split config variable (#10619)
This commit is contained in:
parent
862a089e43
commit
50e1c69874
@ -1357,15 +1357,7 @@ R_API int r_core_anal_bb(RCore *core, RAnalFunction *fcn, ut64 at, int head) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (core->anal->split) {
|
||||
ret = r_anal_fcn_split_bb (core->anal, fcn, bb, at);
|
||||
} else {
|
||||
r_list_foreach (fcn->bbs, iter, bbi) {
|
||||
if (at == bbi->addr) {
|
||||
ret = R_ANAL_RET_DUP;
|
||||
}
|
||||
}
|
||||
}
|
||||
ret = r_anal_fcn_split_bb (core->anal, fcn, bb, at);
|
||||
if (ret == R_ANAL_RET_DUP) {
|
||||
/* Dupped basic block */
|
||||
goto error;
|
||||
@ -1397,9 +1389,7 @@ R_API int r_core_anal_bb(RCore *core, RAnalFunction *fcn, ut64 at, int head) {
|
||||
goto error;
|
||||
}
|
||||
if (bblen == R_ANAL_RET_END) { /* bb analysis complete */
|
||||
if (core->anal->split) {
|
||||
ret = r_anal_fcn_bb_overlaps (fcn, bb);
|
||||
}
|
||||
ret = r_anal_fcn_bb_overlaps (fcn, bb);
|
||||
if (ret == R_ANAL_RET_NEW) {
|
||||
r_anal_fcn_bbadd (fcn, bb);
|
||||
fail = bb->fail;
|
||||
|
@ -309,13 +309,6 @@ static int cb_analcpu(void *user, void *data) {
|
||||
return true;
|
||||
}
|
||||
|
||||
static int cb_analsplit(void *user, void *data) {
|
||||
RCore *core = (RCore*) user;
|
||||
RConfigNode *node = (RConfigNode*) data;
|
||||
core->anal->split = node->i_value;
|
||||
return true;
|
||||
}
|
||||
|
||||
static int cb_analrecont(void *user, void *data) {
|
||||
RCore *core = (RCore*) user;
|
||||
RConfigNode *node = (RConfigNode*) data;
|
||||
@ -2389,7 +2382,6 @@ R_API int r_core_config_init(RCore *core) {
|
||||
update_analarch_options (core, n);
|
||||
SETCB ("anal.cpu", R_SYS_ARCH, &cb_analcpu, "Specify the anal.cpu to use");
|
||||
SETPREF ("anal.prelude", "", "Specify an hexpair to find preludes in code");
|
||||
SETCB ("anal.split", "true", &cb_analsplit, "Split functions into basic blocks in analysis");
|
||||
SETCB ("anal.recont", "false", &cb_analrecont, "End block after splitting a basic block instead of error"); // testing
|
||||
SETCB ("anal.ijmp", "false", &cb_analijmp, "Follow the indirect jumps in function analysis"); // testing
|
||||
SETI ("anal.ptrdepth", 3, "Maximum number of nested pointers to follow in analysis");
|
||||
|
@ -712,7 +712,6 @@ static int cmd_cmp(void *data, const char *input) {
|
||||
}
|
||||
r_core_loadlibs (core2, R_CORE_LOADLIBS_ALL, NULL);
|
||||
core2->io->va = core->io->va;
|
||||
core2->anal->split = core->anal->split;
|
||||
if (!r_core_file_open (core2, file2, 0, 0LL)) {
|
||||
eprintf ("Cannot open diff file '%s'\n", file2);
|
||||
r_core_free (core2);
|
||||
@ -720,7 +719,6 @@ static int cmd_cmp(void *data, const char *input) {
|
||||
}
|
||||
// TODO: must replicate on core1 too
|
||||
r_config_set_i (core2->config, "io.va", true);
|
||||
r_config_set_i (core2->config, "anal.split", true);
|
||||
r_anal_diff_setup (core->anal, diffops, -1, -1);
|
||||
r_anal_diff_setup (core2->anal, diffops, -1, -1);
|
||||
|
||||
|
@ -620,7 +620,6 @@ typedef struct r_anal_t {
|
||||
int bits;
|
||||
int lineswidth; // wtf
|
||||
int big_endian;
|
||||
int split; // used only from core
|
||||
int sleep; // sleep some usecs before analyzing more (avoid 100% cpu usages)
|
||||
RAnalCPPABI cpp_abi;
|
||||
void *user;
|
||||
|
Loading…
x
Reference in New Issue
Block a user