Fix #1849 - sym.main is not lost anymore

This commit is contained in:
pancake 2014-12-17 23:27:19 +01:00
parent c42056228d
commit 628301c56f
2 changed files with 16 additions and 9 deletions

View File

@ -1536,9 +1536,12 @@ R_API int r_core_anal_all(RCore *core) {
if ((binmain = r_bin_get_sym (core->bin, R_BIN_SYM_MAIN)) != NULL) {
ut64 addr = va? binmain->vaddr: binmain->paddr; // offset + va?baddr+binmain->vaddr:binmain->paddr;
r_core_anal_fcn (core, addr, -1, R_ANAL_REF_TYPE_NULL, depth);
#if 0
// This will rename sym.main to 'main'. NOPE
/* rename function */
if (!item || item->offset != addr)
r_core_cmdf (core, "afn main 0x%08"PFMT64x, addr);
#endif
}
if ((list = r_bin_get_entries (core->bin)) != NULL)
r_list_foreach (list, iter, entry)

View File

@ -2129,18 +2129,22 @@ static int cmd_anal(void *data, const char *input) {
eprintf ("Interrupted\n");
r_cons_clear_line (1);
r_cons_break_end();
if (input[1] == '?') {
switch (input[1]) {
case '?': {
const char* help_msg[] = {
"Usage:", "aa[0*?]", " # see also 'af', 'ac' and 'afna'",
"aa", " ", "alias for 'af@@ sym.*;af@entry0'", //;.afna @@ fcn.*'",
"aaa", "", "autoname functions after aa (see afna)",
"aa*", "", "print the commands that 'aa' will run",
NULL};
r_core_cmd_help (core, help_msg);
} else if (input[1] == '*') {
"Usage:", "aa[0*?]", " # see also 'af', 'ac' and 'afna'",
"aa", " ", "alias for 'af@@ sym.*;af@entry0'", //;.afna @@ fcn.*'",
"aaa", "", "autoname functions after aa (see afna)",
"aa*", "", "print the commands that 'aa' will run",
NULL};
r_core_cmd_help (core, help_msg); }
break;
case '*':
r_cons_printf ("af @@ sym.* ; af @ entry0\n");// ; .afna @@ fcn.*\n");
} else if (input[1] != 'a') {
break;
case 'a':
r_core_cmd0 (core, ".afna @@ fcn.*");
break;
}
break;
case 'c':