aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-lang.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/ada-lang.c')
-rw-r--r--gdb/ada-lang.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index dc5f2b6..ba59913 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -4405,18 +4405,22 @@ defns_collected (struct obstack *obstackp, int finish)
return (struct ada_symbol_info *) obstack_base (obstackp);
}
-/* Return a minimal symbol matching NAME according to Ada decoding
- rules. Returns NULL if there is no such minimal symbol. Names
- prefixed with "standard__" are handled specially: "standard__" is
- first stripped off, and only static and global symbols are searched. */
+/* Return a bound minimal symbol matching NAME according to Ada
+ decoding rules. Returns an invalid symbol if there is no such
+ minimal symbol. Names prefixed with "standard__" are handled
+ specially: "standard__" is first stripped off, and only static and
+ global symbols are searched. */
-struct minimal_symbol *
+struct bound_minimal_symbol
ada_lookup_simple_minsym (const char *name)
{
+ struct bound_minimal_symbol result;
struct objfile *objfile;
struct minimal_symbol *msymbol;
const int wild_match_p = should_use_wild_match (name);
+ memset (&result, 0, sizeof (result));
+
/* Special case: If the user specifies a symbol name inside package
Standard, do a non-wild matching of the symbol name without
the "standard__" prefix. This was primarily introduced in order
@@ -4431,10 +4435,14 @@ ada_lookup_simple_minsym (const char *name)
{
if (match_name (SYMBOL_LINKAGE_NAME (msymbol), name, wild_match_p)
&& MSYMBOL_TYPE (msymbol) != mst_solib_trampoline)
- return msymbol;
+ {
+ result.minsym = msymbol;
+ result.objfile = objfile;
+ break;
+ }
}
- return NULL;
+ return result;
}
/* For all subprograms that statically enclose the subprogram of the