aboutsummaryrefslogtreecommitdiff
path: root/gdb/progspace.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/progspace.c')
-rw-r--r--gdb/progspace.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/progspace.c b/gdb/progspace.c
index 7175fa6..54531d9 100644
--- a/gdb/progspace.c
+++ b/gdb/progspace.c
@@ -149,6 +149,7 @@ release_program_space (struct program_space *pspace)
free_address_space (pspace->aspace);
resize_section_table (&pspace->target_sections,
-resize_section_table (&pspace->target_sections, 0));
+ clear_program_space_solib_cache (pspace);
/* Discard any data modules have associated with the PSPACE. */
program_space_free_data (pspace);
xfree (pspace);
@@ -503,6 +504,22 @@ switch_to_program_space_and_thread (struct program_space *pspace)
+/* See progspace.h. */
+
+void
+clear_program_space_solib_cache (struct program_space *pspace)
+{
+ int ix;
+ char *name;
+
+ VEC_free (so_list_ptr, pspace->added_solibs);
+ for (ix = 0; VEC_iterate (char_ptr, pspace->deleted_solibs, ix, name); ++ix)
+ xfree (name);
+ VEC_free (char_ptr, pspace->deleted_solibs);
+}
+
+
+
/* Keep a registry of per-program_space data-pointers required by other GDB
modules. */