diff --git a/gdb/printcmd.c b/gdb/printcmd.c index 87b1448..f1517d2 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -1107,6 +1107,27 @@ sym_info (char *arg, int from_tty) error_no_arg (_("address")); addr = parse_and_eval_address (arg); + +{ +struct symbol *sym=find_pc_function (addr); +if (sym) { + printf_filtered ("find_pc_function \""); + fprintf_symbol_filtered (gdb_stdout, SYMBOL_PRINT_NAME (sym), + current_language->la_language, DMGL_ANSI); + printf_filtered ("\".\n"); +} +} +{ +struct bound_minimal_symbol bmfun=lookup_minimal_symbol_by_pc(addr); +if (bmfun.minsym) { + printf_filtered ("lookup_minimal_symbol_by_pc \""); + fprintf_symbol_filtered (gdb_stdout, MSYMBOL_PRINT_NAME (bmfun.minsym), + current_language->la_language, DMGL_ANSI); + printf_filtered ("\".\n"); +} +} + + ALL_OBJSECTIONS (objfile, osect) { /* Only process each object file once, even if there's a separate