aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-exp.y
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-03-11 07:55:42 -0700
committerTom Tromey <tom@tromey.com>2024-01-28 10:58:16 -0700
commit6c0152149476085e6c4c5c812bfc3a06fff7c938 (patch)
tree176aaa96a5ecfadea04a57996c530bb8ebbc9e95 /gdb/ada-exp.y
parent88ff5355adfee1c015ce98f0d79475f53678a7bb (diff)
downloadfsf-binutils-gdb-6c0152149476085e6c4c5c812bfc3a06fff7c938.zip
fsf-binutils-gdb-6c0152149476085e6c4c5c812bfc3a06fff7c938.tar.gz
fsf-binutils-gdb-6c0152149476085e6c4c5c812bfc3a06fff7c938.tar.bz2
Use domain_search_flags in lookup_global_symbol_language
This changes quick_symbol_functions::lookup_global_symbol_language to accept domain_search_flags rather than just a domain_enum, and fixes up the fallout. To avoid introducing any regressions, any code passing VAR_DOMAIN now uses SEARCH_VFT. That is, no visible changes should result from this patch. However, it sets the stage to refine some searches later on.
Diffstat (limited to 'gdb/ada-exp.y')
-rw-r--r--gdb/ada-exp.y13
1 files changed, 7 insertions, 6 deletions
diff --git a/gdb/ada-exp.y b/gdb/ada-exp.y
index 2500bd0..1f439b3 100644
--- a/gdb/ada-exp.y
+++ b/gdb/ada-exp.y
@@ -1265,7 +1265,7 @@ write_object_renaming (struct parser_state *par_state,
name = obstack_strndup (&temp_parse_space, renamed_entity,
renamed_entity_len);
- ada_lookup_encoded_symbol (name, orig_left_context, VAR_DOMAIN, &sym_info);
+ ada_lookup_encoded_symbol (name, orig_left_context, SEARCH_VFT, &sym_info);
if (sym_info.symbol == NULL)
error (_("Could not find renamed variable: %s"), ada_decode (name).c_str ());
else if (sym_info.symbol->aclass () == LOC_TYPEDEF)
@@ -1334,7 +1334,7 @@ write_object_renaming (struct parser_state *par_state,
renaming_expr = end;
ada_lookup_encoded_symbol (index_name, orig_left_context,
- VAR_DOMAIN, &index_sym_info);
+ SEARCH_VFT, &index_sym_info);
if (index_sym_info.symbol == NULL)
error (_("Could not find %s"), index_name);
else if (index_sym_info.symbol->aclass () == LOC_TYPEDEF)
@@ -1404,7 +1404,7 @@ block_lookup (const struct block *context, const char *raw_name)
}
std::vector<struct block_symbol> syms
- = ada_lookup_symbol_list (name, context, VAR_DOMAIN);
+ = ada_lookup_symbol_list (name, context, SEARCH_VFT);
if (context == NULL
&& (syms.empty () || syms[0].symbol->aclass () != LOC_BLOCK))
@@ -1483,7 +1483,7 @@ find_primitive_type (struct parser_state *par_state, const char *name)
(char *) alloca (strlen (name) + sizeof ("standard__"));
strcpy (expanded_name, "standard__");
strcat (expanded_name, name);
- sym = ada_lookup_symbol (expanded_name, NULL, VAR_DOMAIN).symbol;
+ sym = ada_lookup_symbol (expanded_name, NULL, SEARCH_VFT).symbol;
if (sym != NULL && sym->aclass () == LOC_TYPEDEF)
type = sym->type ();
}
@@ -1670,7 +1670,8 @@ write_var_or_type (struct parser_state *par_state,
encoded_name[tail_index] = terminator;
std::vector<struct block_symbol> syms
- = ada_lookup_symbol_list (decoded_name.c_str (), block, VAR_DOMAIN);
+ = ada_lookup_symbol_list (decoded_name.c_str (), block,
+ SEARCH_VFT);
type_sym = select_possible_type_sym (syms);
@@ -1876,7 +1877,7 @@ write_name_assoc (struct parser_state *par_state, struct stoken name)
std::vector<struct block_symbol> syms
= ada_lookup_symbol_list (name.ptr,
par_state->expression_context_block,
- VAR_DOMAIN);
+ SEARCH_VFT);
if (syms.size () != 1 || syms[0].symbol->aclass () == LOC_TYPEDEF)
pstate->push_new<ada_string_operation> (copy_name (name));