From 1304f099bc900e60f31817b19cc22634880c6611 Mon Sep 17 00:00:00 2001 From: John Gilmore Date: Thu, 11 Jun 1992 08:43:29 +0000 Subject: Small changes from Solaris port. The big stuff is not all working yet. * inferior.h (register_valid): Declare. * remote-udi.c, rs6000-xdep.c, sparc-xdep.c, tm-rs6000.h: Remove decl. * objfiles.h (ALL_OBJFILE_{SYMTABS,PSYMTABS,MSYMBOLS}): Add macros for traversing the data structures in a single objfile. * tm-m88k.h, tm-sparc.h (REGISTER_NAMES): Remove extra semicolon. * tm-i960.h (REGISTER_NAMES): Cosmetic change. * infcmd.c: Lint. --- gdb/objfiles.h | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'gdb/objfiles.h') diff --git a/gdb/objfiles.h b/gdb/objfiles.h index 51a2a82..68bfd9a 100644 --- a/gdb/objfiles.h +++ b/gdb/objfiles.h @@ -325,22 +325,39 @@ have_minimal_symbols PARAMS ((void)); (obj) != NULL? ((nxt)=(obj)->next,1) :0; \ (obj) = (nxt)) + +/* Traverse all symtabs in one objfile. */ + +#define ALL_OBJFILE_SYMTABS(objfile, s) \ + for ((s) = (objfile) -> symtabs; (s) != NULL; (s) = (s) -> next) + +/* Traverse all psymtabs in one objfile. */ + +#define ALL_OBJFILE_PSYMTABS(objfile, p) \ + for ((p) = (objfile) -> psymtabs; (p) != NULL; (p) = (p) -> next) + +/* Traverse all minimal symbols in one objfile. */ + +#define ALL_OBJFILE_MSYMBOLS(objfile, m) \ + for ((m) = (objfile) -> msymbols; (m)->name != NULL; (m)++) + + /* Traverse all symtabs in all objfiles. */ #define ALL_SYMTABS(objfile, s) \ ALL_OBJFILES (objfile) \ - for ((s) = (objfile) -> symtabs; (s) != NULL; (s) = (s) -> next) + ALL_OBJFILE_SYMTABS (objfile, s) /* Traverse all psymtabs in all objfiles. */ #define ALL_PSYMTABS(objfile, p) \ ALL_OBJFILES (objfile) \ - for ((p) = (objfile) -> psymtabs; (p) != NULL; (p) = (p) -> next) + ALL_OBJFILE_PSYMTABS (objfile, p) /* Traverse all minimal symbols in all objfiles. */ #define ALL_MSYMBOLS(objfile, m) \ ALL_OBJFILES (objfile) \ - for ((m) = (objfile) -> msymbols; (m)->name != NULL; (m)++) + ALL_OBJFILE_MSYMBOLS (objfile, m) #endif /* !defined (OBJFILES_H) */ -- cgit v1.1