diff options
Diffstat (limited to 'gdb/minsyms.c')
-rw-r--r-- | gdb/minsyms.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/minsyms.c b/gdb/minsyms.c index fd7fcd9..8eb7c85 100644 --- a/gdb/minsyms.c +++ b/gdb/minsyms.c @@ -50,6 +50,7 @@ #include "cp-support.h" #include "language.h" #include "cli/cli-utils.h" +#include "symbol.h" /* Accumulate the minimal symbols for each objfile in bunches of BUNCH_SIZE. At the end, copy them all into one newly allocated location on an objfile's @@ -299,6 +300,21 @@ lookup_bound_minimal_symbol (const char *name) return lookup_minimal_symbol (name, NULL, NULL); } +/* See common/symbol.h. */ + +int +find_minimal_symbol_address (const char *name, CORE_ADDR *addr, + struct objfile *objfile) +{ + struct bound_minimal_symbol sym + = lookup_minimal_symbol (name, NULL, objfile); + + if (sym.minsym != NULL) + *addr = BMSYMBOL_VALUE_ADDRESS (sym); + + return sym.minsym == NULL; +} + /* See minsyms.h. */ void |