mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-22 23:31:26 +00:00
core/anal: give better names to function when they have symbols
This commit is contained in:
parent
490689c3ac
commit
dddb490969
@ -361,12 +361,18 @@ static int core_anal_fcn(RCore *core, ut64 at, ut64 from, int reftype, int depth
|
||||
continue;
|
||||
}
|
||||
}
|
||||
f = r_flag_get_i (core->flags, fcn->addr);
|
||||
f = r_flag_get_i2 (core->flags, fcn->addr);
|
||||
free (fcn->name);
|
||||
if (f && *f->name)
|
||||
if (f && *f->name) {
|
||||
fcn->name = strdup (f->name);
|
||||
else
|
||||
fcn->name = r_str_newf ("fcn.%08"PFMT64x, fcn->addr);
|
||||
} else {
|
||||
f = r_flag_get_i (core->flags, fcn->addr);
|
||||
if (f && *f->name) {
|
||||
fcn->name = strdup (f->name);
|
||||
} else {
|
||||
fcn->name = r_str_newf ("fcn.%08"PFMT64x, fcn->addr);
|
||||
}
|
||||
}
|
||||
|
||||
if (fcnlen == R_ANAL_RET_ERROR ||
|
||||
(fcnlen == R_ANAL_RET_END && fcn->size < 1)) { /* Error analyzing function */
|
||||
|
@ -217,8 +217,6 @@ R_API RFlagItem *r_flag_get_i2(RFlag *f, ut64 off) {
|
||||
if (!list) return NULL;
|
||||
|
||||
r_list_foreach (list, iter, item) {
|
||||
// XXX: hack, because some times the hashtable is poluted by ghost values
|
||||
if (item->offset != off) continue;
|
||||
if (!item->name) continue;
|
||||
/* catch sym. first */
|
||||
if (!strncmp (item->name, "loc.", 4)) continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user