* xcoffexec.c (exec_ops): child_attach and child_create_inferior
[deliverable/binutils-gdb.git] / gdb / objfiles.h
index 51a2a822de2884f0a06cd62d0dffe69f6381859b..53e67866fd5737874e169a85f20f4c52a29f747e 100644 (file)
@@ -325,22 +325,40 @@ 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)++)
+    if ((objfile)->msymbols)    \
+      ALL_OBJFILE_MSYMBOLS (objfile, m)
 
 #endif /* !defined (OBJFILES_H) */
This page took 0.023492 seconds and 4 git commands to generate.