Now that we've removed the macros and moved various functions to be
methods on program_space (removing uses of current_program_space),
it's clear that exec_target::close can operate on program spaces
without changing the current program space.
gdb/ChangeLog
2020-10-29 Tom Tromey <tom@tromey.com>
* exec.c (exec_target::close): Don't change current program
space.
+2020-10-29 Tom Tromey <tom@tromey.com>
+
+ * exec.c (exec_target::close): Don't change current program
+ space.
+
2020-10-29 Tom Tromey <tom@tromey.com>
* symfile.c (add_symbol_file_command): Update.
void
exec_target::close ()
{
- scoped_restore_current_program_space restore_pspace;
-
for (struct program_space *ss : program_spaces)
{
- set_current_program_space (ss);
ss->target_sections.clear ();
ss->exec_close ();
}