mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-24 06:48:46 +00:00
Deprecate anal.cpu, just use asm.cpu ##core
This commit is contained in:
parent
b8e1fa3d49
commit
059ae407cd
@ -342,9 +342,9 @@ R_API bool r_core_bin_set_env(RCore *r, RBinFile *binfile) {
|
||||
r_config_set_i (r->config, "asm.bits", bits);
|
||||
r_config_set (r->config, "anal.arch", arch);
|
||||
if (info->cpu && *info->cpu) {
|
||||
r_config_set (r->config, "anal.cpu", info->cpu);
|
||||
r_config_set (r->config, "asm.cpu", info->cpu);
|
||||
} else {
|
||||
r_config_set (r->config, "anal.cpu", arch);
|
||||
r_config_set (r->config, "asm.cpu", arch);
|
||||
}
|
||||
r_asm_use (r->rasm, arch);
|
||||
r_core_bin_info (r, R_CORE_BIN_ACC_ALL, NULL, R_MODE_SET, va, NULL, NULL);
|
||||
|
@ -493,6 +493,7 @@ static bool cb_analarch(void *user, void *data) {
|
||||
return false;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static bool cb_analcpu(void *user, void *data) {
|
||||
RCore *core = (RCore *) user;
|
||||
RConfigNode *node = (RConfigNode *) data;
|
||||
@ -509,6 +510,7 @@ static bool cb_analcpu(void *user, void *data) {
|
||||
r_config_set_i (core->config, "asm.pcalign", (v != -1)? v: 0);
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
static bool cb_analrecont(void *user, void *data) {
|
||||
RCore *core = (RCore*) user;
|
||||
@ -664,6 +666,7 @@ static void update_asmcpu_options(RCore *core, RConfigNode *node) {
|
||||
}
|
||||
|
||||
static bool cb_asmcpu(void *user, void *data) {
|
||||
// cb_analcpu (user, data);
|
||||
RCore *core = (RCore *) user;
|
||||
RConfigNode *node = (RConfigNode *) data;
|
||||
if (*node->value == '?') {
|
||||
@ -676,7 +679,12 @@ static bool cb_asmcpu(void *user, void *data) {
|
||||
return 0;
|
||||
}
|
||||
r_asm_set_cpu (core->rasm, node->value);
|
||||
r_config_set (core->config, "anal.cpu", node->value);
|
||||
r_arch_set_cpu (core->rasm->config, node->value);
|
||||
int v = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_ALIGN);
|
||||
if (v != -1) {
|
||||
core->anal->config->pcalign = v;
|
||||
}
|
||||
r_config_set_i (core->config, "asm.pcalign", (v != -1)? v: 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -3389,7 +3397,7 @@ R_API int r_core_config_init(RCore *core) {
|
||||
n = NODECB ("anal.arch", R_SYS_ARCH, &cb_analarch);
|
||||
SETDESC (n, "select the architecture to use");
|
||||
update_analarch_options (core, n);
|
||||
SETCB ("anal.cpu", R_SYS_ARCH, &cb_analcpu, "specify the anal.cpu to use");
|
||||
// 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.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
|
||||
|
Loading…
x
Reference in New Issue
Block a user