-/* Traverse all primary symtabs in one objfile. */
-
-#define ALL_OBJFILE_PRIMARY_SYMTABS(objfile, s) \
- ALL_OBJFILE_SYMTABS ((objfile), (s)) \
- if ((s)->primary)
-
-/* Traverse all minimal symbols in one objfile. */
-
-#define ALL_OBJFILE_MSYMBOLS(objfile, m) \
- for ((m) = (objfile)->per_bfd->msymbols; \
- MSYMBOL_LINKAGE_NAME (m) != NULL; \
- (m)++)
-
-/* Traverse all symtabs in all objfiles in the current symbol
- space. */
-
-#define ALL_SYMTABS(objfile, s) \
- ALL_OBJFILES (objfile) \
- ALL_OBJFILE_SYMTABS (objfile, s)
-
-#define ALL_PSPACE_SYMTABS(ss, objfile, s) \
- ALL_PSPACE_OBJFILES (ss, objfile) \
- ALL_OBJFILE_SYMTABS (objfile, s)
-
-/* Traverse all symtabs in all objfiles in the current program space,
- skipping included files (which share a blockvector with their
- primary symtab). */
-
-#define ALL_PRIMARY_SYMTABS(objfile, s) \
- ALL_OBJFILES (objfile) \
- ALL_OBJFILE_PRIMARY_SYMTABS (objfile, s)
-
-#define ALL_PSPACE_PRIMARY_SYMTABS(pspace, objfile, s) \
- ALL_PSPACE_OBJFILES (ss, objfile) \
- ALL_OBJFILE_PRIMARY_SYMTABS (objfile, s)
-
-/* Traverse all minimal symbols in all objfiles in the current symbol
- space. */
-
-#define ALL_MSYMBOLS(objfile, m) \
- ALL_OBJFILES (objfile) \
- ALL_OBJFILE_MSYMBOLS (objfile, m)
-
-#define ALL_OBJFILE_OSECTIONS(objfile, osect) \
- for (osect = objfile->sections; osect < objfile->sections_end; osect++) \
- if (osect->the_bfd_section == NULL) \
- { \
- /* Nothing. */ \
- } \
- else
-
-/* Traverse all obj_sections in all objfiles in the current program
- space.
-
- Note that this detects a "break" in the inner loop, and exits
- immediately from the outer loop as well, thus, client code doesn't
- need to know that this is implemented with a double for. The extra
- hair is to make sure that a "break;" stops the outer loop iterating
- as well, and both OBJFILE and OSECT are left unmodified:
-
- - The outer loop learns about the inner loop's end condition, and
- stops iterating if it detects the inner loop didn't reach its
- end. In other words, the outer loop keeps going only if the
- inner loop reached its end cleanly [(osect) ==
- (objfile)->sections_end].
-
- - OSECT is initialized in the outer loop initialization
- expressions, such as if the inner loop has reached its end, so
- the check mentioned above succeeds the first time.
-
- - The trick to not clearing OBJFILE on a "break;" is, in the outer
- loop's loop expression, advance OBJFILE, but iff the inner loop
- reached its end. If not, there was a "break;", so leave OBJFILE
- as is; the outer loop's conditional will break immediately as
- well (as OSECT will be different from OBJFILE->sections_end). */
-
-#define ALL_OBJSECTIONS(objfile, osect) \
- for ((objfile) = current_program_space->objfiles, \
- (objfile) != NULL ? ((osect) = (objfile)->sections_end) : 0; \
- (objfile) != NULL \
- && (osect) == (objfile)->sections_end; \
- ((osect) == (objfile)->sections_end \
- ? ((objfile) = (objfile)->next, \
- (objfile) != NULL ? (osect) = (objfile)->sections_end : 0) \
- : 0)) \
- ALL_OBJFILE_OSECTIONS (objfile, osect)