Remove ALL_COMPUNIT_FILETABS
This removes ALL_COMPUNIT_FILETABS, replacing its uses with ranged for loops. Because this is still used in the ALL_OBJFILE_FILETABS macro, in some places a declaration had to be removed or renamed to avoid shadowing. gdb/ChangeLog 2019-01-09 Tom Tromey <tom@tromey.com> * symtab.h (ALL_COMPUNIT_FILETABS): Remove. (compunit_filetabs): New. * symtab.c (iterate_over_some_symtabs, find_pc_sect_line): Use compunit_filetabs. (info_sources_command, make_source_files_completion_list): Remove declaration. * symmisc.c (print_objfile_statistics, dump_objfile) (maintenance_print_symbols): Remove declaration. (maintenance_info_symtabs): Use compunit_filetabs. (maintenance_info_line_tables): Likewise. * source.c (select_source_symtab): Change local variable name. (forget_cached_source_info_for_objfile): Remove declaration. * objfiles.h (ALL_OBJFILE_FILETABS): Use compunit_filetabs. * objfiles.c (objfile_relocate1): Remove declaration. * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_files): Remove declaration. * maint.c (count_symtabs_and_blocks): Use compunit_filetabs. * coffread.c (coff_symtab_read): Remove declaration. * buildsym.c (buildsym_compunit::end_symtab_with_blockvector): Use compunit_filetabs.
This commit is contained in:
parent
d8aeb77f04
commit
5accd1a07e
11 changed files with 52 additions and 45 deletions
|
@ -82,7 +82,6 @@ void
|
|||
print_objfile_statistics (void)
|
||||
{
|
||||
struct program_space *pspace;
|
||||
struct symtab *s;
|
||||
int i, linetables, blockvectors;
|
||||
|
||||
ALL_PSPACES (pspace)
|
||||
|
@ -144,8 +143,6 @@ print_objfile_statistics (void)
|
|||
static void
|
||||
dump_objfile (struct objfile *objfile)
|
||||
{
|
||||
struct symtab *symtab;
|
||||
|
||||
printf_filtered ("\nObject file %s: ", objfile_name (objfile));
|
||||
printf_filtered ("Objfile at ");
|
||||
gdb_print_host_address (objfile, gdb_stdout);
|
||||
|
@ -467,7 +464,6 @@ maintenance_print_symbols (const char *args, int from_tty)
|
|||
}
|
||||
else
|
||||
{
|
||||
struct symtab *s;
|
||||
int found = 0;
|
||||
|
||||
for (objfile *objfile : all_objfiles (current_program_space))
|
||||
|
@ -772,8 +768,6 @@ maintenance_info_symtabs (const char *regexp, int from_tty)
|
|||
ALL_PSPACES (pspace)
|
||||
for (objfile *objfile : all_objfiles (pspace))
|
||||
{
|
||||
struct symtab *symtab;
|
||||
|
||||
/* We don't want to print anything for this objfile until we
|
||||
actually find a symtab whose name matches. */
|
||||
int printed_objfile_start = 0;
|
||||
|
@ -782,7 +776,7 @@ maintenance_info_symtabs (const char *regexp, int from_tty)
|
|||
{
|
||||
int printed_compunit_symtab_start = 0;
|
||||
|
||||
ALL_COMPUNIT_FILETABS (cust, symtab)
|
||||
for (symtab *symtab : compunit_filetabs (cust))
|
||||
{
|
||||
QUIT;
|
||||
|
||||
|
@ -1026,11 +1020,9 @@ maintenance_info_line_tables (const char *regexp, int from_tty)
|
|||
ALL_PSPACES (pspace)
|
||||
for (objfile *objfile : all_objfiles (pspace))
|
||||
{
|
||||
struct symtab *symtab;
|
||||
|
||||
for (compunit_symtab *cust : objfile_compunits (objfile))
|
||||
{
|
||||
ALL_COMPUNIT_FILETABS (cust, symtab)
|
||||
for (symtab *symtab : compunit_filetabs (cust))
|
||||
{
|
||||
QUIT;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue