Rename libr/core/anal.c -> libr/core/canal.c

This commit is contained in:
Álvaro Felipe Melchor 2017-01-14 16:56:05 +01:00
parent 43e77cf459
commit 96ccb9808e
3 changed files with 18 additions and 9 deletions

View File

@ -8,7 +8,7 @@ DEPS+=r_reg r_search r_syscall r_socket r_fs r_magic r_crypto
OBJS=core.o cmd.o file.o cconfig.o visual.o cio.o yank.o libs.o graph.o
OBJS+=hack.o vasm.o patch.o cbin.o log.o rtr.o cmd_api.o
OBJS+=anal.o project.o gdiff.o asm.o vmenus.o disasm.o plugin.o
OBJS+=canal.o project.o gdiff.o asm.o vmenus.o disasm.o plugin.o
OBJS+=help.o task.o panels.o pseudo.o vmarks.o anal_tp.o
CFLAGS+=-DCORELIB

View File

@ -523,11 +523,13 @@ static int core_anal_fcn(RCore *core, ut64 at, ut64 from, int reftype, int depth
R_FREE (fcn->name);
core->flags->space_strict = true;
f = r_flag_get_at (core->flags, fcn->addr, true);
if (f && f->name && strncmp (f->name, "sect", 4) && strncmp (f->name, "sym.func.", 9)) {
if (f && f->name && strncmp (f->name, "sect", 4) &&
strncmp (f->name, "sym.func.", 9)) {
fcn->name = strdup (f->name);
} else {
f = r_flag_get_i2 (core->flags, fcn->addr);
if (f && f->name && strncmp (f->name, "sect", 4) && strncmp (f->name, "sym.func.", 9)) {
if (f && f->name && strncmp (f->name, "sect", 4) &&
strncmp (f->name, "sym.func.", 9)) {
fcn->name = strdup (f->name);
} else {
fcn->name = r_str_newf ("fcn.%08"PFMT64x, fcn->addr);

View File

@ -330,13 +330,20 @@ R_API RFlagItem *r_flag_get_i2(RFlag *f, ut64 off) {
if (!list) return NULL;
r_list_foreach (list, iter, item) {
if (!item->name) continue;
if (!item->name) {
continue;
}
/* catch sym. first */
if (!strncmp (item->name, "loc.", 4)) continue;
if (!strncmp (item->name, "fcn.", 4)) continue;
if (!strncmp (item->name, "section.", 4)) continue;
if (r_str_nlen(item->name, 5) > 4 &&
if (!strncmp (item->name, "loc.", 4)) {
continue;
}
if (!strncmp (item->name, "fcn.", 4)) {
continue;
}
if (!strncmp (item->name, "section.", 4)) {
continue;
}
if (r_str_nlen (item->name, 5) > 4 &&
item->name[3] == '.') {
oitem = item;
break;