daily update
[deliverable/binutils-gdb.git] / gdb / objfiles.h
index cf5fc38624d9352316244dfaa9ab08559854ccd8..76410fd447cde02c0dac691eb143ddfc05f9b052 100644 (file)
@@ -363,15 +363,25 @@ struct objfile
     struct obj_section
      *sections, *sections_end;
 
-    /* Link to objfile that contains the debug symbols for this one.
-       One is loaded if this file has an debug link to an existing
-       debug file with the right checksum */
+    /* GDB allows to have debug symbols in separate object files.  This is
+       used by .gnu_debuglink, ELF build id note and Mach-O OSO.
+       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
+       has a non-nul separate_debug_objfile_backlink.  */
+
+    /* Link to the first separate debug object, if any.  */
     struct objfile *separate_debug_objfile;
 
     /* If this is a separate debug object, this is used as a link to the
        actual executable objfile. */
     struct objfile *separate_debug_objfile_backlink;
-    
+
+    /* If this is a separate debug object, this is a link to the next one
+       for the same executable objfile.  */
+    struct objfile *separate_debug_objfile_link;
+
     /* Place to stash various statistics about this objfile */
       OBJSTATS;
 
@@ -452,14 +462,21 @@ extern int build_objfile_section_table (struct objfile *);
 
 extern void terminate_minimal_symbol_table (struct objfile *objfile);
 
+extern struct objfile *objfile_separate_debug_iterate (const struct objfile *,
+                                                       const struct objfile *);
+
 extern void put_objfile_before (struct objfile *, struct objfile *);
 
 extern void objfile_to_front (struct objfile *);
 
+extern void add_separate_debug_objfile (struct objfile *, struct objfile *);
+
 extern void unlink_objfile (struct objfile *);
 
 extern void free_objfile (struct objfile *);
 
+extern void free_objfile_separate_debug (struct objfile *);
+
 extern struct cleanup *make_cleanup_free_objfile (struct objfile *);
 
 extern void free_all_objfiles (void);
@@ -516,6 +533,7 @@ extern void *objfile_data (struct objfile *objfile,
 
 extern struct bfd *gdb_bfd_ref (struct bfd *abfd);
 extern void gdb_bfd_unref (struct bfd *abfd);
+extern int gdb_bfd_close_or_warn (struct bfd *abfd);
 \f
 
 /* Traverse all object files in the current program space.
@@ -547,11 +565,6 @@ extern void gdb_bfd_unref (struct bfd *abfd);
 #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) \
@@ -582,17 +595,6 @@ extern void gdb_bfd_unref (struct bfd *abfd);
     ALL_OBJFILE_SYMTABS (objfile, s)                   \
       if ((s)->primary)
 
-/* Traverse all psymtabs in all objfiles in the current symbol
-   space.  */
-
-#define        ALL_PSYMTABS(objfile, p) \
-  ALL_OBJFILES (objfile)        \
-    ALL_OBJFILE_PSYMTABS (objfile, p)
-
-#define ALL_PSPACE_PSYMTABS(ss, objfile, p)            \
-  ALL_PSPACE_OBJFILES (ss, objfile)                    \
-    ALL_OBJFILE_PSYMTABS (objfile, p)
-
 /* Traverse all minimal symbols in all objfiles in the current symbol
    space.  */
 
This page took 0.026866 seconds and 4 git commands to generate.