Skip to content

Commit

Permalink
Leftovers from the resolve_fcn_name renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
radare authored and trufae committed Oct 26, 2023
1 parent 621ae3f commit b036e1b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
7 changes: 1 addition & 6 deletions libr/core/carg.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ static void set_fcn_args_info(RAnalFuncArg *arg, RAnal *anal, const char *fcn_na
arg->cc_source = r_anal_cc_arg (anal, cc, arg_num, -1);
}

// R2_590 - deprecate
R_API char *resolve_fcn_name(RAnal *anal, const char *fname) {
return r_type_func_name (anal->sdb_types, fname);
}

static ut64 get_buf_val(ut8 *buf, int endian, int width) {
return (width == 8)? r_read_ble64 (buf, endian) : (ut64) r_read_ble32 (buf,endian);
}
Expand Down Expand Up @@ -208,7 +203,7 @@ R_API RList *r_core_get_func_args(RCore *core, const char *fcn_name) {
return NULL;
}
Sdb *TDB = core->anal->sdb_types;
char *key = resolve_fcn_name (core->anal, fcn_name);
char *key = r_type_func_name (core->anal->sdb_types, fcn_name);
if (!key) {
return NULL;
}
Expand Down
10 changes: 5 additions & 5 deletions libr/core/cmd_anal.inc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3729,7 +3729,7 @@ static void cmd_anal_fcn_sig(RCore *core, const char *input) {
return;
}
pj_a (j);
char *key = (fcn_name)? resolve_fcn_name (core->anal, fcn_name): NULL;
char *key = fcn_name? r_type_func_name (core->anal->sdb_types, fcn_name): NULL;
if (key) {
const char *fcn_type = r_type_func_ret (core->anal->sdb_types, key);
int nargs = r_type_func_args_count (core->anal->sdb_types, key);
Expand Down Expand Up @@ -4571,7 +4571,7 @@ static void cmd_afsv(RCore *core, ut64 pcv, int mode) {
fcn_name = item->name;
}
}
char *key = fcn_name? resolve_fcn_name (core->anal, fcn_name): NULL;
char *key = fcn_name? r_type_func_name (core->anal->sdb_types, fcn_name): NULL;
RStrBuf *sb = r_strbuf_new ("");
int nargs = DEFAULT_NARGS;
if (pj) {
Expand Down Expand Up @@ -5278,7 +5278,7 @@ static int cmd_af(RCore *core, const char *input) {
ut64 addr = core->offset;
const char *arg = r_str_trim_head_ro (input + 2);
RAnalFunction *f = r_anal_get_fcn_in (core->anal, addr, R_ANAL_FCN_TYPE_NULL);
if (!f) {
if (!f) {
R_LOG_ERROR ("No function defined at 0x%08" PFMT64x, addr);
break;
}
Expand Down Expand Up @@ -7508,7 +7508,7 @@ static void r_anal_aefa(RCore *core, const char *arg) {
#if 0
// get results
const char *fcn_type = r_type_func_ret (core->anal->sdb_types, fcn->name);
const char *key = resolve_fcn_name (core->anal, fcn->name);
const char *key = r_type_func_name (core->anal->sdb_types, fcn->name);
RList *list = r_core_get_func_args (core, key);
if (!r_list_empty (list)) {
eprintf ("HAS signature\n");
Expand Down Expand Up @@ -14130,7 +14130,7 @@ static void cmd_anal_aC(RCore *core, const char *input) {
fcn_name = item->name;
}
}
char *key = (fcn_name)? resolve_fcn_name (core->anal, fcn_name): NULL;
char *key = fcn_name? r_type_func_name (core->anal->sdb_types, fcn_name): NULL;
if (key) {
const char *fcn_type = r_type_func_ret (core->anal->sdb_types, key);
int nargs = r_type_func_args_count (core->anal->sdb_types, key);
Expand Down
2 changes: 1 addition & 1 deletion libr/core/disasm.c
Original file line number Diff line number Diff line change
Expand Up @@ -5338,7 +5338,7 @@ static void ds_comment_call(RDisasmState *ds) {
}
}
if (fcn_name) {
key = resolve_fcn_name (core->anal, fcn_name);
key = r_type_func_name (core->anal->sdb_types, fcn_name);
}
int nargs = DEFAULT_NARGS;
if (key) {
Expand Down
1 change: 0 additions & 1 deletion libr/include/r_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,6 @@ R_API char *r_core_disassemble_bytes(RCore *core, ut64 addr, int b);
/* carg.c */
R_API RList *r_core_get_func_args(RCore *core, const char *func_name);
R_API void r_core_print_func_args(RCore *core);
R_API char *resolve_fcn_name(RAnal *anal, const char *func_name);
R_API int r_core_get_stacksz(RCore *core, ut64 from, ut64 to);

/* anal.c */
Expand Down

0 comments on commit b036e1b

Please sign in to comment.