{
if (preg == NULL || preg->exec (name, 0, NULL, 0) == 0)
{
- struct bound_minimal_symbol msymbol
- = ada_lookup_simple_minsym (name);
+ symbol_name_match_type match_type = name_match_type_from_name (name);
+ lookup_name_info lookup_name (name, match_type);
- if (msymbol.minsym != NULL)
- {
- struct ada_exc_info info
- = {name, msymbol.value_address ()};
+ symbol_name_matcher_ftype *match_name
+ = ada_get_symbol_name_matcher (lookup_name);
- exceptions->push_back (info);
+ /* Iterate over all objfiles irrespective of scope or linker
+ namespaces so we get all exceptions anywhere in the
+ progspace. */
+ for (objfile *objfile : current_program_space->objfiles ())
+ {
+ for (minimal_symbol *msymbol : objfile->msymbols ())
+ {
+ if (match_name (msymbol->linkage_name (), lookup_name,
+ nullptr)
+ && msymbol->type () != mst_solib_trampoline)
+ {
+ ada_exc_info info
+ = {name, msymbol->value_address (objfile)};
+
+ exceptions->push_back (info);
+ }
+ }
}
}
}
SEARCH_GLOBAL_BLOCK | SEARCH_STATIC_BLOCK,
VARIABLES_DOMAIN);
+ /* Iterate over all objfiles irrespective of scope or linker namespaces
+ so we get all exceptions anywhere in the progspace. */
for (objfile *objfile : current_program_space->objfiles ())
{
for (compunit_symtab *s : objfile->compunits ())