From b036e1bdde5eb431a944754dbe61fba9c8cca2a9 Mon Sep 17 00:00:00 2001 From: pancake Date: Thu, 26 Oct 2023 11:25:39 +0200 Subject: [PATCH] Leftovers from the resolve_fcn_name renaming --- libr/core/carg.c | 7 +------ libr/core/cmd_anal.inc.c | 10 +++++----- libr/core/disasm.c | 2 +- libr/include/r_core.h | 1 - 4 files changed, 7 insertions(+), 13 deletions(-) diff --git a/libr/core/carg.c b/libr/core/carg.c index 4510e93771096..e77598da1664b 100644 --- a/libr/core/carg.c +++ b/libr/core/carg.c @@ -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); } @@ -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; } diff --git a/libr/core/cmd_anal.inc.c b/libr/core/cmd_anal.inc.c index 5f80427b1edec..9b13f9bb98831 100644 --- a/libr/core/cmd_anal.inc.c +++ b/libr/core/cmd_anal.inc.c @@ -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); @@ -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) { @@ -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; } @@ -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"); @@ -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); diff --git a/libr/core/disasm.c b/libr/core/disasm.c index 046d57f5e9b11..fe44bb03d6fa4 100644 --- a/libr/core/disasm.c +++ b/libr/core/disasm.c @@ -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) { diff --git a/libr/include/r_core.h b/libr/include/r_core.h index 279854bf5ed1a..17c102b432731 100644 --- a/libr/include/r_core.h +++ b/libr/include/r_core.h @@ -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 */