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 ()) { ... } */
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;