diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2020-03-07 14:02:43 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2020-05-12 15:24:51 -0400 |
commit | fb113f4f48482171dffd287b2bdb71a6c7e20797 (patch) | |
tree | 18ae01cfd3fadbcadd34390792abe9f76497b1f4 /mkinstalldirs | |
parent | 5b75b03006538d552813369deebc2069f3082b01 (diff) | |
download | binutils-gdb-fb113f4f48482171dffd287b2bdb71a6c7e20797.tar.gz |
Make mapped_debug_names independent of objfile
mapped_debug_names currently has a dwarf2_per_objfile field. Since we
want it to become objfile-independent, this field must be removed.
This patch removes it, and then arranges for all methods that needed it
to accept a dwarf2_per_objfile parameter. This trickles down at various
places, like the dw2_debug_names_iterator type.
Ultimately, the objfile only seems to be needed because we might need to
read a string from the string section. For that, we might need to read
in the section, and if it's a relocatable section, the objfile is needed
in order to do the relocation. This pattern happens often (that we to
pass an objfile only because a section might be read). I think it's a
bit ugly, but I don't have a good alternative right now.
gdb/ChangeLog:
* dwarf2/read.c (struct mapped_index_base) <symbol_name_at,
build_name_components, find_name_components_bounds>:
Add per_objfile parameter.
(struct mapped_index) <symbol_name_at>: Likewise.
(struct mapped_debug_names): Remove constructor.
<dwarf2_per_objfile>: Remove field.
<namei_to_name, symbol_name_at>: Add per_objfile parameter.
(mapped_index_base::find_name_components_bounds,
mapped_index_base::build_name_components,
dw2_expand_symtabs_matching_symbol): Likewise.
(class mock_mapped_index) <symbol_name_at>: Likewise.
(check_match): Likewise.
(check_find_bounds_finds): Likewise.
(test_mapped_index_find_name_component_bounds): Update.
(CHECK_MATCH): Update.
(dw2_expand_symtabs_matching): Update.
(class dw2_debug_names_iterator) <dw2_debug_names_iterator>: Add
per_objfile parameter.
<find_vec_in_debug_names>: Likewise.
<m_per_objfile>: New field.
(mapped_debug_names::namei_to_name): Add dwarf2_per_objfile
parameter.
(dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
(dw2_debug_names_iterator::next): Update.
(dw2_debug_names_lookup_symbol): Update.
(dw2_debug_names_expand_symtabs_for_function): Update.
(dw2_debug_names_map_matching_symbols): Update.
(dw2_debug_names_expand_symtabs_matching): Update.
(dwarf2_read_debug_names): Update.
Diffstat (limited to 'mkinstalldirs')
0 files changed, 0 insertions, 0 deletions