Change address_space to use new and delete

This changes address_space to use new and delete, and makes some other
small C++-ification changes as well, like changing address_space_num
to be a method.

This patch was needed for the subsequent patch to rewrite the registry
system.
This commit is contained in:
Tom Tromey
2020-10-18 10:47:48 -06:00
parent e5213e2c85
commit b382c16682
5 changed files with 31 additions and 39 deletions

View File

@@ -501,7 +501,7 @@ holding the child stopped. Try \"set detach-on-fork\" or \
}
else
{
child_inf->aspace = new_address_space ();
child_inf->aspace = new address_space ();
child_inf->pspace = new program_space (child_inf->aspace);
child_inf->removable = 1;
clone_program_space (child_inf->pspace, parent_inf->pspace);
@@ -573,7 +573,7 @@ holding the child stopped. Try \"set detach-on-fork\" or \
child_inf->aspace = parent_inf->aspace;
child_inf->pspace = parent_inf->pspace;
parent_inf->aspace = new_address_space ();
parent_inf->aspace = new address_space ();
parent_inf->pspace = new program_space (parent_inf->aspace);
clone_program_space (parent_inf->pspace, child_inf->pspace);
@@ -583,7 +583,7 @@ holding the child stopped. Try \"set detach-on-fork\" or \
}
else
{
child_inf->aspace = new_address_space ();
child_inf->aspace = new address_space ();
child_inf->pspace = new program_space (child_inf->aspace);
child_inf->removable = 1;
child_inf->symfile_flags = SYMFILE_NO_READ;