From b669c95337903d39aa2254e8ea0405c0ac117d24 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 15 Jan 2019 20:06:48 -0700 Subject: Add compunits range adapter to objfile This removes the objfile_compunits range adapter in favor of using a method on objfile. 2019-01-15 Tom Tromey * symtab.c (lookup_objfile_from_block) (lookup_symbol_in_objfile_symtabs) (basic_lookup_transparent_type_1, find_pc_sect_compunit_symtab) (find_line_symtab, info_sources_command) (default_collect_symbol_completion_matches_break_on) (make_source_files_completion_list): Update. * symmisc.c (print_objfile_statistics, dump_objfile) (maintenance_print_symbols, maintenance_info_symtabs) (maintenance_check_symtabs, maintenance_info_line_tables): Update. * source.c (select_source_symtab) (forget_cached_source_info_for_objfile): Update. * objfiles.h (class objfile_compunits): Remove. (struct objfile) : New typedef. (compunits): New method. * objfiles.c (objfile_relocate1): Update. * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_files): Update. * maint.c (count_symtabs_and_blocks): Update. * linespec.c (iterate_over_all_matching_symtabs): Update. * cp-support.c (add_symbol_overload_list_qualified): Update. * coffread.c (coff_symtab_read): Update. * ada-lang.c (add_nonlocal_symbols) (ada_collect_symbol_completion_matches) (ada_add_global_exceptions): Update. --- gdb/mi/mi-cmd-file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/mi/mi-cmd-file.c') diff --git a/gdb/mi/mi-cmd-file.c b/gdb/mi/mi-cmd-file.c index 0d9770a2f58..714ab01b264 100644 --- a/gdb/mi/mi-cmd-file.c +++ b/gdb/mi/mi-cmd-file.c @@ -94,7 +94,7 @@ mi_cmd_file_list_exec_source_files (const char *command, char **argv, int argc) /* Look at all of the file symtabs. */ for (objfile *objfile : current_program_space->objfiles ()) { - for (compunit_symtab *cu : objfile_compunits (objfile)) + for (compunit_symtab *cu : objfile->compunits ()) { for (symtab *s : compunit_filetabs (cu)) { -- cgit v1.2.1