diff options
author | Tom Tromey <tom@tromey.com> | 2019-01-15 20:06:48 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-01-17 15:42:05 -0700 |
commit | b669c95337903d39aa2254e8ea0405c0ac117d24 (patch) | |
tree | 78a37f3188cbc3f00e0c2c87298f92bed8b64e76 /gdb/symtab.c | |
parent | 7e955d83c4128ec773d84b92487ed1cdfed09938 (diff) | |
download | gdb-b669c95337903d39aa2254e8ea0405c0ac117d24.zip gdb-b669c95337903d39aa2254e8ea0405c0ac117d24.tar.gz gdb-b669c95337903d39aa2254e8ea0405c0ac117d24.tar.bz2 |
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 <tom@tromey.com>
* 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) <compunits_range>: 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.
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r-- | gdb/symtab.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c index 370c8b4..b8ebbc2 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -2171,7 +2171,7 @@ lookup_objfile_from_block (const struct block *block) /* Look through all blockvectors. */ for (objfile *obj : current_program_space->objfiles ()) { - for (compunit_symtab *cust : objfile_compunits (obj)) + for (compunit_symtab *cust : obj->compunits ()) if (block == BLOCKVECTOR_BLOCK (COMPUNIT_BLOCKVECTOR (cust), GLOBAL_BLOCK)) { @@ -2265,7 +2265,7 @@ lookup_symbol_in_objfile_symtabs (struct objfile *objfile, int block_index, name, domain_name (domain)); } - for (compunit_symtab *cust : objfile_compunits (objfile)) + for (compunit_symtab *cust : objfile->compunits ()) { const struct blockvector *bv; const struct block *block; @@ -2763,7 +2763,7 @@ basic_lookup_transparent_type_1 (struct objfile *objfile, int block_index, const struct block *block; const struct symbol *sym; - for (compunit_symtab *cust : objfile_compunits (objfile)) + for (compunit_symtab *cust : objfile->compunits ()) { bv = COMPUNIT_BLOCKVECTOR (cust); block = BLOCKVECTOR_BLOCK (bv, block_index); @@ -2904,7 +2904,7 @@ find_pc_sect_compunit_symtab (CORE_ADDR pc, struct obj_section *section) for (objfile *obj_file : current_program_space->objfiles ()) { - for (compunit_symtab *cust : objfile_compunits (obj_file)) + for (compunit_symtab *cust : obj_file->compunits ()) { struct block *b; const struct blockvector *bv; @@ -3360,7 +3360,7 @@ find_line_symtab (struct symtab *sym_tab, int line, 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)) { @@ -4200,7 +4200,7 @@ info_sources_command (const char *ignore, int from_tty) data.first = 1; 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)) { @@ -4492,7 +4492,7 @@ search_symbols (const char *regexp, enum search_domain kind, for (objfile *objfile : current_program_space->objfiles ()) { - for (compunit_symtab *cust : objfile_compunits (objfile)) + for (compunit_symtab *cust : objfile->compunits ()) { bv = COMPUNIT_BLOCKVECTOR (cust); for (i = GLOBAL_BLOCK; i <= STATIC_BLOCK; i++) @@ -5293,7 +5293,7 @@ default_collect_symbol_completion_matches_break_on /* Add completions for all currently loaded symbol tables. */ for (objfile *objfile : current_program_space->objfiles ()) { - for (compunit_symtab *cust : objfile_compunits (objfile)) + for (compunit_symtab *cust : objfile->compunits ()) add_symtab_completions (cust, tracker, mode, lookup_name, sym_text, word, code); } @@ -5602,7 +5602,7 @@ make_source_files_completion_list (const char *text, const char *word) 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)) { |