{
char *name;
enum { SIMPLE_INDEX, LOWER_BOUND, UPPER_BOUND } slice_state;
- struct block_symbol sym_info;
if (max_depth <= 0)
error (_("Could not find renamed symbol"));
name = obstack_strndup (&ada_parser->temp_space, renamed_entity,
renamed_entity_len);
- ada_lookup_encoded_symbol (name, orig_left_context, SEARCH_VFT, &sym_info);
+ block_symbol sym_info = ada_lookup_encoded_symbol (name, orig_left_context,
+ SEARCH_VFT);
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)
{
const char *end;
char *index_name;
- struct block_symbol index_sym_info;
end = strchr (renaming_expr, 'X');
if (end == NULL)
end - renaming_expr);
renaming_expr = end;
- ada_lookup_encoded_symbol (index_name, orig_left_context,
- SEARCH_VFT, &index_sym_info);
+ block_symbol index_sym_info
+ = ada_lookup_encoded_symbol (index_name, orig_left_context,
+ SEARCH_VFT);
if (index_sym_info.symbol == NULL)
error (_("Could not find %s"), index_name);
else if (index_sym_info.symbol->aclass () == LOC_TYPEDEF)
if (lookup_cached_symbol (name, domain, &sym.symbol, NULL))
return sym.symbol;
- ada_lookup_encoded_symbol (name, block, domain, &sym);
+ sym = ada_lookup_encoded_symbol (name, block, domain);
cache_symbol (name, domain, sym.symbol, sym.block);
return sym.symbol;
}
/* The result is as for ada_lookup_symbol_list with FULL_SEARCH set
to 1, but choosing the first symbol found if there are multiple
- choices.
+ choices. */
- The result is stored in *INFO, which must be non-NULL.
- If no match is found, INFO->SYM is set to NULL. */
-
-void
+block_symbol
ada_lookup_encoded_symbol (const char *name, const struct block *block,
- domain_search_flags domain,
- struct block_symbol *info)
+ domain_search_flags domain)
{
/* Since we already have an encoded name, wrap it in '<>' to force a
verbatim match. Otherwise, if the name happens to not look like
would e.g., incorrectly lowercase object renaming names like
"R28b" -> "r28b". */
std::string verbatim = add_angle_brackets (name);
-
- gdb_assert (info != NULL);
- *info = ada_lookup_symbol (verbatim.c_str (), block, domain);
+ return ada_lookup_symbol (verbatim.c_str (), block, domain);
}
/* Return a symbol in DOMAIN matching NAME, in BLOCK0 and enclosing
const struct block *,
domain_search_flags);
-extern void ada_lookup_encoded_symbol
- (const char *name, const struct block *block, domain_search_flags domain,
- struct block_symbol *symbol_info);
+extern block_symbol ada_lookup_encoded_symbol
+ (const char *name, const struct block *block, domain_search_flags domain);
extern struct bound_minimal_symbol ada_lookup_simple_minsym (const char *,
objfile *);