diff options
author | Tom Tromey <tom@tromey.com> | 2023-11-16 18:02:14 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2024-01-28 10:58:16 -0700 |
commit | 54d186cf6554099057d76c7a4df730423eefe977 (patch) | |
tree | a86127bf5778dacd1f21124ab9a9a17014c3e99e /gdb/ada-lang.c | |
parent | 974b36c2ae2b351d022cc62579656f722da6e17a (diff) | |
download | gdb-54d186cf6554099057d76c7a4df730423eefe977.zip gdb-54d186cf6554099057d76c7a4df730423eefe977.tar.gz gdb-54d186cf6554099057d76c7a4df730423eefe977.tar.bz2 |
Simplify some symbol searches in Ada code
This changes some of the Ada code to simplify symbol searches. For
example, if a function is being looked for, the search is narrowed to
use SEARCH_FUNCTION_DOMAIN rather than SEARCH_VFT. In one spot, a
search of the "struct" domain is removed, because Ada does not have a
tag domain.
Diffstat (limited to 'gdb/ada-lang.c')
-rw-r--r-- | gdb/ada-lang.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index a15ea7b..f1d01ec 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -7436,14 +7436,8 @@ field_alignment (struct type *type, int f) static struct symbol * ada_find_any_type_symbol (const char *name) { - struct symbol *sym; - - sym = standard_lookup (name, get_selected_block (NULL), SEARCH_VFT); - if (sym != NULL && sym->aclass () == LOC_TYPEDEF) - return sym; - - sym = standard_lookup (name, NULL, SEARCH_STRUCT_DOMAIN); - return sym; + return standard_lookup (name, get_selected_block (nullptr), + SEARCH_TYPE_DOMAIN); } /* Find a type named NAME. Ignores ambiguity. This routine will look |