aboutsummaryrefslogtreecommitdiff
path: root/gdb/progspace.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/progspace.c')
-rw-r--r--gdb/progspace.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gdb/progspace.c b/gdb/progspace.c
index d1bf0c6..3cb0d4c 100644
--- a/gdb/progspace.c
+++ b/gdb/progspace.c
@@ -23,6 +23,7 @@
#include "arch-utils.h"
#include "gdbcore.h"
#include "solib.h"
+#include "solist.h"
#include "gdbthread.h"
#include "inferior.h"
#include <algorithm>
@@ -157,6 +158,23 @@ program_space::~program_space ()
/* See progspace.h. */
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)
+ gdb_assert (so->objfile == NULL);
+
+ while (!objfiles_list.empty ())
+ objfiles_list.front ()->unlink ();
+
+ clear_symtab_users (0);
+}
+
+/* See progspace.h. */
+
+void
program_space::add_objfile (struct objfile *objfile, struct objfile *before)
{
if (before == nullptr)