{
struct address_space *aspace;
- aspace = XZALLOC (struct address_space);
+ aspace = XCNEW (struct address_space);
aspace->num = ++highest_address_space_num;
address_space_alloc_data (aspace);
{
struct program_space *pspace;
- pspace = XZALLOC (struct program_space);
+ pspace = XCNEW (struct program_space);
pspace->num = ++last_program_space_num;
pspace->aspace = aspace;
free_all_objfiles ();
if (!gdbarch_has_shared_address_space (target_gdbarch ()))
free_address_space (pspace->aspace);
- resize_section_table (&pspace->target_sections,
- -resize_section_table (&pspace->target_sections, 0));
+ clear_section_table (&pspace->target_sections);
clear_program_space_solib_cache (pspace);
/* Discard any data modules have associated with the PSPACE. */
program_space_free_data (pspace);
do_cleanups (old_chain);
}
-/* Unlinks PSPACE from the pspace list, and releases it. */
-
-void
-remove_program_space (struct program_space *pspace)
-{
- struct program_space *ss, **ss_link;
-
- ss = program_spaces;
- ss_link = &program_spaces;
- while (ss)
- {
- if (ss != pspace)
- {
- ss_link = &ss->next;
- ss = *ss_link;
- continue;
- }
-
- *ss_link = ss->next;
- release_program_space (ss);
- ss = *ss_link;
- }
-}
-
/* Copies program space SRC to DEST. Copies the main executable file,
and the main symbol file. Returns DEST. */
int count = 0;
struct cleanup *old_chain;
- /* Might as well prune away unneeded ones, so the user doesn't even
- seem them. */
- prune_program_spaces ();
-
/* Compute number of pspaces we will print. */
ALL_PSPACES (pspace)
{