Make ada_lookup_encoded_symbol "return" a struct ada_symbol_info

This makes ada_lookup_encoded_symbol more consistent with other functions
such as ada_lookup_symbol_list, and also makes it clearer in the code
using that function that symbol and block are related.

gdb/ChangeLog:

        * ada-lang.c (ada_lookup_encoded_symbol): Now returns void.
        Replace block_found argument by symbol_info.  Adjust
        implementation accordingly.  Add function documentation.
        (ada_lookup_symbol): Adjust to new ada_lookup_encoded_symbol.
        Fix documentation.
        * ada-lang.h (ada_lookup_encoded_symbol): Update declaration.
        * ada-exp.y (write_object_renaming): Adjust to new
        ada_lookup_encoded_symbol API.
This commit is contained in:
Joel Brobecker
2012-03-29 18:23:00 +00:00
parent 1c0ac8c766
commit 4e5c77fe1a
4 changed files with 56 additions and 36 deletions

View File

@@ -235,9 +235,9 @@ extern char *ada_fold_name (const char *);
extern struct symbol *ada_lookup_symbol (const char *, const struct block *,
domain_enum, int *);
extern struct symbol *
ada_lookup_encoded_symbol (const char *, const struct block *,
domain_enum namespace, struct block **);
extern void ada_lookup_encoded_symbol
(const char *name, const struct block *block, domain_enum namespace,
struct ada_symbol_info *symbol_info);
extern struct minimal_symbol *ada_lookup_simple_minsym (const char *);