Add Ada support for .debug_names
authorTom Tromey <tromey@adacore.com>
Mon, 8 Jul 2019 12:23:16 +0000 (06:23 -0600)
committerTom Tromey <tromey@adacore.com>
Tue, 10 Sep 2019 14:30:45 +0000 (08:30 -0600)
commit3b00ef10a2a4750a86a04bb66eda3bf33d298be1
tree727c40c0df3bfc1a1da24df5e4d5162067b5c13a
parentaa3916548076c159ae00a922690694094a37fcd0
Add Ada support for .debug_names

This patch adds support for Ada to .debug_names.  I opted to leave
.gdb_index alone, because in my view it is a defunct format.

gdb/ChangeLog
2019-09-10  Tom Tromey  <tromey@adacore.com>

* dwarf-index-write.c (write_psymbols): Extend error message.
(debug_names::insert): Add Ada code.
(debug_names::write_psymbols): Remove Ada check.
(debug_names) <m_string_obstack>: New member.
* dwarf2read.c (gdb_index_symbol_name_matcher): Remove.
(gdb_index_symbol_name_matcher::matches): Remove.
(mapped_index_base::find_name_components_bounds): Add "lang"
parameter.
(mapped_index_base::build_name_components): Also split names
according to Ada syntax.
(dw2_expand_symtabs_matching_symbol): Loop over languages.  Change
type of "match_callback".
(check_match, check_find_bounds_finds)
(dw2_expand_symtabs_matching): Update.
(dw2_debug_names_iterator): Add new constructor.
(dw2_debug_names_map_matching_symbols): New function.
(dw2_debug_names_expand_symtabs_matching): Update.
(dwarf2_debug_names_functions): Use
dw2_debug_names_map_matching_symbols.
gdb/ChangeLog
gdb/dwarf-index-write.c
gdb/dwarf2read.c