From: Tom Tromey Date: Thu, 29 Oct 2020 21:04:33 +0000 (-0600) Subject: Don't change current program space in exec_target::close X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5008b3b2ebb6859212a3fd6a716dc4278d9b14bb;p=binutils-gdb.git Don't change current program space in exec_target::close 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 * exec.c (exec_target::close): Don't change current program space. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4096a1bff52..3dff81ac62a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-10-29 Tom Tromey + + * exec.c (exec_target::close): Don't change current program + space. + 2020-10-29 Tom Tromey * symfile.c (add_symbol_file_command): Update. diff --git a/gdb/exec.c b/gdb/exec.c index 9c4d9bef908..8ab71621d2e 100644 --- a/gdb/exec.c +++ b/gdb/exec.c @@ -154,11 +154,8 @@ exec_target_open (const char *args, int from_tty) 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 (); }