aboutsummaryrefslogtreecommitdiff
path: root/gdb/objfiles.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-11-24 09:58:20 -0700
committerTom Tromey <tom@tromey.com>2019-01-09 18:28:15 -0700
commit8b31193aa9752ba60d63cedaba943370d76ce543 (patch)
tree3e6787e80428ab357880409a63be7a620b769ffd /gdb/objfiles.h
parentd5da8b3c0d99e71c27832a4e9b60c61eebf9767c (diff)
downloadgdb-8b31193aa9752ba60d63cedaba943370d76ce543.zip
gdb-8b31193aa9752ba60d63cedaba943370d76ce543.tar.gz
gdb-8b31193aa9752ba60d63cedaba943370d76ce543.tar.bz2
Remove ALL_OBJFILES and ALL_FILETABS
This removes the ALL_OBJFILES and ALL_FILETABS macros, replacing them with ranged for loops. gdb/ChangeLog 2019-01-09 Tom Tromey <tom@tromey.com> * symtab.c (find_line_symtab, info_sources_command) (make_source_files_completion_list): Use objfile_compunits. * source.c (select_source_symtab): Use objfile_compunits. * objfiles.h (struct objfile): Update comment. (ALL_OBJFILES): Remove. (ALL_FILETABS): Remove. * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_files): Use objfile_compunits.
Diffstat (limited to 'gdb/objfiles.h')
-rw-r--r--gdb/objfiles.h18
1 files changed, 1 insertions, 17 deletions
diff --git a/gdb/objfiles.h b/gdb/objfiles.h
index 33acb20..b8d5b65 100644
--- a/gdb/objfiles.h
+++ b/gdb/objfiles.h
@@ -430,7 +430,7 @@ struct objfile
Although this is a tree structure, GDB only support one level
(ie a separate debug for a separate debug is not supported). Note that
separate debug object are in the main chain and therefore will be
- visited by ALL_OBJFILES & co iterators. Separate debug objfile always
+ visited by all_objfiles & co iterators. Separate debug objfile always
has a non-nul separate_debug_objfile_backlink. */
/* Link to the first separate debug object, if any. */
@@ -604,14 +604,6 @@ public:
}
};
-
-/* Traverse all object files in the current program space. */
-
-#define ALL_OBJFILES(obj) \
- for ((obj) = current_program_space->objfiles; \
- (obj) != NULL; \
- (obj) = (obj)->next)
-
/* A range adapter that makes it possible to iterate over all
compunits in one objfile. */
@@ -705,14 +697,6 @@ private:
struct objfile *m_objfile;
};
-/* Traverse all symtabs in all objfiles in the current symbol
- space. */
-
-#define ALL_FILETABS(objfile, ps, s) \
- ALL_OBJFILES (objfile) \
- for (compunit_symtab *ps : objfile_compunits (objfile)) \
- for (symtab *s : compunit_filetabs (cu))
-
#define ALL_OBJFILE_OSECTIONS(objfile, osect) \
for (osect = objfile->sections; osect < objfile->sections_end; osect++) \
if (osect->the_bfd_section == NULL) \