Introduce program_space::add_objfile
[deliverable/binutils-gdb.git] / gdb / progspace.h
index 073da1fbc062dc4dc4923c4b5d2fd222085f0460..bb10c4bbd26c74dd001258ddea5804642e0f60cf 100644 (file)
@@ -22,7 +22,6 @@
 #define PROGSPACE_H
 
 #include "target.h"
-#include "gdbsupport/vec.h"
 #include "gdb_bfd.h"
 #include "gdbsupport/gdb_vecs.h"
 #include "registry.h"
@@ -141,7 +140,7 @@ struct program_space
 
   typedef next_adapter<struct objfile> objfiles_range;
 
-  /* Return an iterarable object that can be used to iterate over all
+  /* Return an iterable object that can be used to iterate over all
      objfiles.  The basic use is in a foreach, like:
 
      for (objfile *objf : pspace->objfiles ()) { ... }  */
@@ -166,6 +165,12 @@ struct program_space
     return objfiles_safe_range (objfiles_head);
   }
 
+  /* Add OBJFILE to the list of objfiles, putting it just before
+     BEFORE.  If BEFORE is nullptr, it will go at the end of the
+     list.  */
+  void add_objfile (struct objfile *objfile, struct objfile *before);
+
+
   /* Pointer to next in linked list.  */
   struct program_space *next = NULL;
 
This page took 0.029765 seconds and 4 git commands to generate.