struct program_space *
clone_program_space (struct program_space *dest, struct program_space *src)
{
- struct program_space *new_pspace;
struct cleanup *old_chain;
old_chain = save_current_program_space ();
restore_program_space (void *arg)
{
struct program_space *saved_pspace = arg;
+
set_current_program_space (saved_pspace);
}
{
struct cleanup *old_chain = make_cleanup (restore_program_space,
current_program_space);
+
return old_chain;
}
static int
pspace_empty_p (struct program_space *pspace)
{
- struct inferior *inf;
-
if (find_inferior_for_program_space (pspace) != NULL)
return 0;
if (shared_aspace)
{
struct address_space *aspace = new_address_space ();
+
free_address_space (current_program_space->aspace);
ALL_PSPACES (pspace)
pspace->aspace = aspace;