diff options
author | Tom Tromey <tom@tromey.com> | 2021-04-17 09:35:04 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2021-04-17 09:35:06 -0600 |
commit | 90160b57032ce8c2d12864a53036bab2c5b86682 (patch) | |
tree | 8d999d738be70a8d34aa6ef9a086ac098a3f4703 /gdb/dwarf2 | |
parent | 7089bd886ec78d623c3188cac48c039bc5eaf3b6 (diff) | |
download | gdb-90160b57032ce8c2d12864a53036bab2c5b86682.zip gdb-90160b57032ce8c2d12864a53036bab2c5b86682.tar.gz gdb-90160b57032ce8c2d12864a53036bab2c5b86682.tar.bz2 |
Remove quick_symbol_functions::expand_symtabs_with_fullname
This removes quick_symbol_functions::expand_symtabs_with_fullname,
replacing it with a call to expand_symtabs_matching. As with the
previous patches, the implementation is consolidated in the objfile
method.
gdb/ChangeLog
2021-04-17 Tom Tromey <tom@tromey.com>
* quick-symbol.h (struct quick_symbol_functions)
<expand_symtabs_with_fullname>: Remove.
* psymtab.c (psymbol_functions::expand_symtabs_with_fullname):
Remove.
* psympriv.h (struct psymbol_functions)
<expand_symtabs_with_fullname>: Remove.
* dwarf2/read.c (struct dwarf2_base_index_functions)
<expand_symtabs_with_fullname>: Remove.
(dwarf2_base_index_functions::expand_symtabs_with_fullname):
Remove.
* objfiles.h (struct objfile) <expand_symtabs_with_fullname>:
Update comment.
* symfile-debug.c (objfile::expand_symtabs_with_fullname):
Rewrite.
Diffstat (limited to 'gdb/dwarf2')
-rw-r--r-- | gdb/dwarf2/read.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 007b70e..6befb77 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -2241,9 +2241,6 @@ struct dwarf2_base_index_functions : public quick_symbol_functions void expand_all_symtabs (struct objfile *objfile) override; - void expand_symtabs_with_fullname (struct objfile *objfile, - const char *fullname) override; - struct compunit_symtab *find_pc_sect_compunit_symtab (struct objfile *objfile, struct bound_minimal_symbol msymbol, CORE_ADDR pc, struct obj_section *section, int warn_if_readin) override; @@ -3525,40 +3522,6 @@ dwarf2_base_index_functions::expand_all_symtabs (struct objfile *objfile) } } -void -dwarf2_base_index_functions::expand_symtabs_with_fullname - (struct objfile *objfile, const char *fullname) -{ - dwarf2_per_objfile *per_objfile = get_dwarf2_per_objfile (objfile); - - /* We don't need to consider type units here. - This is only called for examining code, e.g. expand_line_sal. - There can be an order of magnitude (or more) more type units - than comp units, and we avoid them if we can. */ - - for (dwarf2_per_cu_data *per_cu : per_objfile->per_bfd->all_comp_units) - { - /* We only need to look at symtabs not already expanded. */ - if (per_objfile->symtab_set_p (per_cu)) - continue; - - quick_file_names *file_data = dw2_get_file_names (per_cu, per_objfile); - if (file_data == NULL) - continue; - - for (int j = 0; j < file_data->num_file_names; ++j) - { - const char *this_fullname = file_data->file_names[j]; - - if (filename_cmp (this_fullname, fullname) == 0) - { - dw2_instantiate_symtab (per_cu, per_objfile, false); - break; - } - } - } -} - static bool dw2_expand_symtabs_matching_symbol (mapped_index_base &index, |