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/symfile-debug.c | |
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/symfile-debug.c')
-rw-r--r-- | gdb/symfile-debug.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/gdb/symfile-debug.c b/gdb/symfile-debug.c index deabea4..dd5a70b 100644 --- a/gdb/symfile-debug.c +++ b/gdb/symfile-debug.c @@ -334,8 +334,22 @@ objfile::expand_symtabs_with_fullname (const char *fullname) "qf->expand_symtabs_with_fullname (%s, \"%s\")\n", objfile_debug_name (this), fullname); + const char *basename = lbasename (fullname); + auto file_matcher = [&] (const char *filename, bool basenames) + { + return filename_cmp (basenames ? basename : fullname, filename) == 0; + }; + for (const auto &iter : qf) - iter->expand_symtabs_with_fullname (this, fullname); + iter->expand_symtabs_matching (this, + file_matcher, + nullptr, + nullptr, + nullptr, + (SEARCH_GLOBAL_BLOCK + | SEARCH_STATIC_BLOCK), + UNDEF_DOMAIN, + ALL_DOMAIN); } void |