Remove ALL_SO_LIBS and so_list_head
[deliverable/binutils-gdb.git] / gdb / progspace.c
index 6419f01770448a238183b328d4b8f0f3aa5510ab..252b62e02d751ecc25926a1a8311770f5ca940c4 100644 (file)
@@ -192,10 +192,8 @@ program_space::~program_space ()
 void
 program_space::free_all_objfiles ()
 {
-  struct so_list *so;
-
   /* Any objfile reference would become stale.  */
-  for (so = master_so_list (); so; so = so->next)
+  for (struct so_list *so : current_program_space->solibs ())
     gdb_assert (so->objfile == NULL);
 
   while (!objfiles_list.empty ())
@@ -239,6 +237,14 @@ program_space::remove_objfile (struct objfile *objfile)
     symfile_object_file = NULL;
 }
 
+/* See progspace.h.  */
+
+next_adapter<struct so_list>
+program_space::solibs () const
+{
+  return next_adapter<struct so_list> (this->so_list);
+}
+
 /* Copies program space SRC to DEST.  Copies the main executable file,
    and the main symbol file.  Returns DEST.  */
 
This page took 0.025103 seconds and 4 git commands to generate.