mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-28 07:30:33 +00:00
Minor refactoring a2f
This commit is contained in:
parent
861044bddc
commit
fd2f2b92ce
@ -1432,7 +1432,7 @@ R_API int r_anal_fcn_add_bb(RAnal *anal, RAnalFunction *fcn, ut64 addr, ut64 siz
|
||||
bb = bbi;
|
||||
mid = false;
|
||||
break;
|
||||
} else if ((addr > bbi->addr) && (addr < bbi->addr+bbi->size)) {
|
||||
} else if ((addr > bbi->addr) && (addr < bbi->addr + bbi->size)) {
|
||||
mid = true;
|
||||
}
|
||||
}
|
||||
|
@ -271,6 +271,7 @@ static int analyzeFunction(RCore *core, ut64 addr) {
|
||||
RFlagItem *fi;
|
||||
RList *delayed_commands = NULL;
|
||||
RListIter *iter;
|
||||
ut64 loc_addr = 0;
|
||||
char *command = NULL;
|
||||
char *function_label;
|
||||
bool vars = r_config_get_i (core->config, "anal.vars");
|
||||
@ -313,11 +314,9 @@ static int analyzeFunction(RCore *core, ut64 addr) {
|
||||
} else {
|
||||
function_label = r_str_newf ("fcn2.%08"PFMT64x, addr);
|
||||
}
|
||||
loc_addr = sdb_num_get (db, "addr", NULL);
|
||||
r_core_cmdf (core, "af+ 0x%08"PFMT64x" %s\n",
|
||||
sdb_num_get (db, "addr", NULL),
|
||||
// (int)sdb_num_get (db, "size", NULL),
|
||||
function_label);
|
||||
// list bbs
|
||||
loc_addr, function_label);
|
||||
{
|
||||
char *c, *bbs = sdb_get (db, "bbs", NULL);
|
||||
sdb_aforeach (c, bbs) {
|
||||
@ -329,9 +328,7 @@ static int analyzeFunction(RCore *core, ut64 addr) {
|
||||
fail = sdb_array_get_num (db, FbbTo(addr), 1, NULL);
|
||||
|
||||
r_core_cmdf (core, "afb+ 0x%"PFMT64x" 0x%"PFMT64x" %d 0x%"PFMT64x" 0x%"PFMT64x,
|
||||
sdb_num_get (db, "addr", NULL),
|
||||
addr, (int)(addr_end-addr),
|
||||
jump, fail);
|
||||
loc_addr, addr, (int)(addr_end - addr), jump, fail);
|
||||
sdb_aforeach_next (c);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user