mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-03 21:34:46 +08:00
Use function view in quick_symbol_functions::map_symbol_filenames
This changes quick_symbol_functions::map_symbol_filenames to use a function_view, and updates all the uses. It also changes the final parameter to 'bool'. A couple of spots are further updated to use operator() rather than a lambda. gdb/ChangeLog 2021-03-26 Tom Tromey <tom@tromey.com> * symtab.c (struct output_source_filename_data): Add 'output' method and operator(). (output_source_filename_data::output): Rename from output_source_filename. (output_partial_symbol_filename): Remove. (info_sources_command): Update. (struct add_partial_filename_data): Add operator(). (add_partial_filename_data::operator()): Rename from maybe_add_partial_symtab_filename. (make_source_files_completion_list): Update. * symfile.c (quick_symbol_functions): Update. * symfile-debug.c (objfile::map_symbol_filenames): Update. * quick-symbol.h (symbol_filename_ftype): Change type of 'fun' and 'need_fullname'. Remove 'data' parameter. (struct quick_symbol_functions) <map_symbol_filenames>: Likewise. * psymtab.c (psymbol_functions::map_symbol_filenames): Update. * psympriv.h (struct psymbol_functions) <map_symbol_filenames>: Change type of 'fun' and 'need_fullname'. Remove 'data' parameter. * objfiles.h (struct objfile) <map_symbol_filenames>: Change type of 'fun' and 'need_fullname'. Remove 'data' parameter. * mi/mi-cmd-file.c (print_partial_file_name): Remove 'ignore' parameter. (mi_cmd_file_list_exec_source_files): Update. * dwarf2/read.c (dwarf2_base_index_functions::map_symbol_filenames): Update.
This commit is contained in:
@ -323,19 +323,17 @@ objfile::find_pc_sect_compunit_symtab (struct bound_minimal_symbol msymbol,
|
||||
}
|
||||
|
||||
void
|
||||
objfile::map_symbol_filenames (symbol_filename_ftype *fun, void *data,
|
||||
int need_fullname)
|
||||
objfile::map_symbol_filenames (gdb::function_view<symbol_filename_ftype> fun,
|
||||
bool need_fullname)
|
||||
{
|
||||
if (debug_symfile)
|
||||
fprintf_filtered (gdb_stdlog,
|
||||
"qf->map_symbol_filenames (%s, %s, %s, %d)\n",
|
||||
"qf->map_symbol_filenames (%s, ..., %d)\n",
|
||||
objfile_debug_name (this),
|
||||
host_address_to_string (fun),
|
||||
host_address_to_string (data),
|
||||
need_fullname);
|
||||
|
||||
for (const auto &iter : qf)
|
||||
iter->map_symbol_filenames (this, fun, data, need_fullname);
|
||||
iter->map_symbol_filenames (this, fun, need_fullname);
|
||||
}
|
||||
|
||||
struct compunit_symtab *
|
||||
|
Reference in New Issue
Block a user