mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-03 02:41:08 +00:00
Add new command afi. to just get the function name
This commit is contained in:
parent
07caf282f7
commit
d909c3d333
@ -264,9 +264,11 @@ static const char *help_msg_afC[] = {
|
||||
|
||||
static const char *help_msg_afi[] = {
|
||||
"Usage:", "afi[jl*]", " <addr>",
|
||||
"afi", "", "show information of the function",
|
||||
"afi.", "", "show function name in current offset",
|
||||
"afi*", "", "function, variables and arguments",
|
||||
"afij", "", "function info in json format",
|
||||
"afil", "", "verbose function info",
|
||||
"afi*", "", "function, variables and arguments",
|
||||
NULL
|
||||
};
|
||||
|
||||
@ -2071,7 +2073,19 @@ static int cmd_anal_fcn(RCore *core, const char *input) {
|
||||
case '?':
|
||||
r_core_cmd_help (core, help_msg_afi);
|
||||
break;
|
||||
case 'l': // "afil"
|
||||
case '.': // "afi."
|
||||
{
|
||||
ut64 addr = core->offset;
|
||||
if (input[3] == ' ') {
|
||||
addr = r_num_math (core->num, input + 3);
|
||||
}
|
||||
RAnalFunction *fcn = r_anal_get_fcn_in (core->anal, addr, R_ANAL_FCN_TYPE_NULL);
|
||||
if (fcn) {
|
||||
r_cons_printf ("%s\n", fcn->name);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'l': // "afil"
|
||||
if (input[3] == '?') {
|
||||
// TODO #7967 help refactor
|
||||
help_msg_afll[1] = "afil";
|
||||
|
@ -62,6 +62,7 @@ static const char *help_msg_slash[] = {
|
||||
static const char *help_msg_slash_c[] = {
|
||||
"Usage:", "/c [inst]", " Search for asm",
|
||||
"/c ", "instr", "search for instruction 'instr'",
|
||||
"/ce ", "esil", "search for esil expressions matching substring",
|
||||
"/ca ", "instr", "search for instruction 'instr' (in all offsets)",
|
||||
"/c/ ", "instr", "search for instruction that matches regexp 'instr'",
|
||||
"/c/a ", "instr", "search for every byte instruction that matches regexp 'instr'",
|
||||
|
Loading…
Reference in New Issue
Block a user