static void
maint_set_ada_cmd (char *args, int from_tty)
{
- help_list (maint_set_ada_cmdlist, "maintenance set ada ", -1, gdb_stdout);
+ help_list (maint_set_ada_cmdlist, "maintenance set ada ", all_commands,
+ gdb_stdout);
}
/* Implement the "maintenance show ada" (prefix) command. */
static struct value *
ada_read_renaming_var_value (struct symbol *renaming_sym,
- struct block *block)
+ const struct block *block)
{
const char *sym_name;
struct expression *expr;
ada_init_symbol_cache (sym_cache);
}
-/* STRUCT_DOMAIN symbols are also typedefs for the type. This function tests
- the equivalency of two Ada symbol domain types. */
-
-static int
-ada_symbol_matches_domain (domain_enum symbol_domain, domain_enum domain)
-{
- if (symbol_domain == domain
- || ((domain == VAR_DOMAIN || domain == STRUCT_DOMAIN)
- && symbol_domain == STRUCT_DOMAIN))
- return 1;
-
- return 0;
-}
-
/* Search our cache for an entry matching NAME and NAMESPACE.
Return it if found, or NULL otherwise. */
if (lookup_cached_symbol (name, domain, &sym, NULL))
return sym;
sym = lookup_symbol_in_language (name, block, domain, language_c, 0);
-
- /* STRUCT_DOMAIN symbols also define a typedef for the type. Lookup
- a STRUCT_DOMAIN symbol if one is requested for VAR_DOMAIN and not
- found. */
- if (sym == NULL && domain == VAR_DOMAIN)
- sym = lookup_symbol_in_language (name, block, STRUCT_DOMAIN, language_c, 0);
-
cache_symbol (name, domain, sym, block_found);
return sym;
}
data.objfile = objfile;
if (is_wild_match)
- {
- objfile->sf->qf->map_matching_symbols (objfile, name, domain, global,
- aux_add_nonlocal_symbols,
- &data, wild_match, NULL);
- if (domain == VAR_DOMAIN)
- objfile->sf->qf->map_matching_symbols (objfile, name,
- STRUCT_DOMAIN, global,
- aux_add_nonlocal_symbols,
- &data, wild_match, NULL);
- }
+ objfile->sf->qf->map_matching_symbols (objfile, name, domain, global,
+ aux_add_nonlocal_symbols, &data,
+ wild_match, NULL);
else
- {
- objfile->sf->qf->map_matching_symbols (objfile, name, domain, global,
- aux_add_nonlocal_symbols,
- &data, full_match,
- compare_names);
- if (domain == VAR_DOMAIN)
- objfile->sf->qf->map_matching_symbols (objfile, name,
- STRUCT_DOMAIN, global,
- aux_add_nonlocal_symbols,
- &data, full_match,
- compare_names);
- }
+ objfile->sf->qf->map_matching_symbols (objfile, name, domain, global,
+ aux_add_nonlocal_symbols, &data,
+ full_match, compare_names);
}
if (num_defns_collected (obstackp) == 0 && global && !is_wild_match)
for (sym = block_iter_match_first (block, name, wild_match, &iter);
sym != NULL; sym = block_iter_match_next (name, wild_match, &iter))
{
- if (ada_symbol_matches_domain (SYMBOL_DOMAIN (sym), domain)
+ if (symbol_matches_domain (SYMBOL_LANGUAGE (sym),
+ SYMBOL_DOMAIN (sym), domain)
&& wild_match (SYMBOL_LINKAGE_NAME (sym), name) == 0)
{
if (SYMBOL_CLASS (sym) == LOC_UNRESOLVED)
for (sym = block_iter_match_first (block, name, full_match, &iter);
sym != NULL; sym = block_iter_match_next (name, full_match, &iter))
{
- if (ada_symbol_matches_domain (SYMBOL_DOMAIN (sym), domain))
+ if (symbol_matches_domain (SYMBOL_LANGUAGE (sym),
+ SYMBOL_DOMAIN (sym), domain))
{
if (SYMBOL_CLASS (sym) != LOC_UNRESOLVED)
{
ALL_BLOCK_SYMBOLS (block, iter, sym)
{
- if (ada_symbol_matches_domain (SYMBOL_DOMAIN (sym), domain))
+ if (symbol_matches_domain (SYMBOL_LANGUAGE (sym),
+ SYMBOL_DOMAIN (sym), domain))
{
int cmp;
struct symtab *s;
struct minimal_symbol *msymbol;
struct objfile *objfile;
- struct block *b, *surrounding_static_block = 0;
+ const struct block *b, *surrounding_static_block = 0;
int i;
struct block_iterator iter;
struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
struct symbol *sym;
sym = standard_lookup (name, get_selected_block (NULL), VAR_DOMAIN);
- if (sym != NULL
- && (SYMBOL_DOMAIN (sym) != VAR_DOMAIN
- || SYMBOL_CLASS (sym) == LOC_TYPEDEF))
+ if (sym != NULL && SYMBOL_CLASS (sym) == LOC_TYPEDEF)
return sym;
- return NULL;
+ sym = standard_lookup (name, NULL, STRUCT_DOMAIN);
+ return sym;
}
/* Find a type named NAME. Ignores ambiguity. This routine will look
ada_add_exceptions_from_frame (regex_t *preg, struct frame_info *frame,
VEC(ada_exc_info) **exceptions)
{
- struct block *block = get_frame_block (frame, 0);
+ const struct block *block = get_frame_block (frame, 0);
while (block != 0)
{
ALL_PRIMARY_SYMTABS (objfile, s)
{
- struct blockvector *bv = BLOCKVECTOR (s);
+ const struct blockvector *bv = BLOCKVECTOR (s);
int i;
for (i = GLOBAL_BLOCK; i <= STATIC_BLOCK; i++)
static struct value *
ada_read_var_value (struct symbol *var, struct frame_info *frame)
{
- struct block *frame_block = NULL;
+ const struct block *frame_block = NULL;
struct symbol *renaming_sym = NULL;
/* The only case where default_read_var_value is not sufficient
{
printf_unfiltered (_(\
"\"set ada\" must be followed by the name of a setting.\n"));
- help_list (set_ada_list, "set ada ", -1, gdb_stdout);
+ help_list (set_ada_list, "set ada ", all_commands, gdb_stdout);
}
/* Implement the "show ada" prefix command. */