From d5da8b3c0d99e71c27832a4e9b60c61eebf9767c Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 24 Nov 2018 09:51:44 -0700 Subject: Remove ALL_OBJFILE_FILETABS This removes ALL_OBJFILE_FILETABS, replacing its uses with ranged for loops. gdb/ChangeLog 2019-01-09 Tom Tromey * symmisc.c (print_objfile_statistics, dump_objfile) (maintenance_print_symbols): Use compunit_filetabs. * source.c (forget_cached_source_info_for_objfile): Use compunit_filetabs. * objfiles.h (ALL_OBJFILE_FILETABS): Remove. (ALL_FILETABS): Use compunit_filetabs. * objfiles.c (objfile_relocate1): Use compunit_filetabs. * coffread.c (coff_symtab_read): Use compunit_filetabs. --- gdb/source.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'gdb/source.c') diff --git a/gdb/source.c b/gdb/source.c index ed0ff4c..14dda01 100644 --- a/gdb/source.c +++ b/gdb/source.c @@ -349,17 +349,20 @@ show_directories_command (struct ui_file *file, int from_tty, void forget_cached_source_info_for_objfile (struct objfile *objfile) { - ALL_OBJFILE_FILETABS (objfile, cu, s) + for (compunit_symtab *cu : objfile_compunits (objfile)) { - if (s->line_charpos != NULL) + for (symtab *s : compunit_filetabs (cu)) { - xfree (s->line_charpos); - s->line_charpos = NULL; - } - if (s->fullname != NULL) - { - xfree (s->fullname); - s->fullname = NULL; + if (s->line_charpos != NULL) + { + xfree (s->line_charpos); + s->line_charpos = NULL; + } + if (s->fullname != NULL) + { + xfree (s->fullname); + s->fullname = NULL; + } } } -- cgit v1.1