aboutsummaryrefslogtreecommitdiff
path: root/gdb/objfiles.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-11-24 09:51:44 -0700
committerTom Tromey <tom@tromey.com>2019-01-09 18:28:15 -0700
commitd5da8b3c0d99e71c27832a4e9b60c61eebf9767c (patch)
treec4e9e194e65019df77c754dfea3399c34de7080c /gdb/objfiles.c
parent5accd1a07e080c386918da413e0f9e90c4cab58a (diff)
downloadgdb-d5da8b3c0d99e71c27832a4e9b60c61eebf9767c.zip
gdb-d5da8b3c0d99e71c27832a4e9b60c61eebf9767c.tar.gz
gdb-d5da8b3c0d99e71c27832a4e9b60c61eebf9767c.tar.bz2
Remove ALL_OBJFILE_FILETABS
This removes ALL_OBJFILE_FILETABS, replacing its uses with ranged for loops. gdb/ChangeLog 2019-01-09 Tom Tromey <tom@tromey.com> * 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.
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r--gdb/objfiles.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 659998a..75e041e 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -788,20 +788,23 @@ objfile_relocate1 (struct objfile *objfile,
/* OK, get all the symtabs. */
{
- ALL_OBJFILE_FILETABS (objfile, cust, s)
- {
- struct linetable *l;
+ for (compunit_symtab *cust : objfile_compunits (objfile))
+ {
+ for (symtab *s : compunit_filetabs (cust))
+ {
+ struct linetable *l;
- /* First the line table. */
- l = SYMTAB_LINETABLE (s);
- if (l)
- {
- for (int i = 0; i < l->nitems; ++i)
- l->item[i].pc += ANOFFSET (delta,
- COMPUNIT_BLOCK_LINE_SECTION
- (cust));
- }
- }
+ /* First the line table. */
+ l = SYMTAB_LINETABLE (s);
+ if (l)
+ {
+ for (int i = 0; i < l->nitems; ++i)
+ l->item[i].pc += ANOFFSET (delta,
+ COMPUNIT_BLOCK_LINE_SECTION
+ (cust));
+ }
+ }
+ }
for (compunit_symtab *cust : objfile_compunits (objfile))
{