[binutils-gdb] Remove call to exec_close

Tom Tromey tromey@sourceware.org
Thu Oct 29 21:08:27 GMT 2020


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8407f91bd388952721efa7f12c75bf94324dc506

commit 8407f91bd388952721efa7f12c75bf94324dc506
Author: Tom Tromey <tom@tromey.com>
Date:   Thu Oct 29 15:04:33 2020 -0600

    Remove call to exec_close
    
    There's no need to call exec_close from ~progspace, because that
    method just does some cleanup that's already going to be done during
    destruction.  This patch removes the call.
    
    gdb/ChangeLog
    2020-10-29  Tom Tromey  <tom@tromey.com>
    
            * progspace.c (program_space::~program_space): Don't call
            exec_close.

Diff:
---
 gdb/ChangeLog   | 5 +++++
 gdb/progspace.c | 1 -
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3dff81ac62a..fe585c4f531 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2020-10-29  Tom Tromey  <tom@tromey.com>
+
+	* progspace.c (program_space::~program_space): Don't call
+	exec_close.
+
 2020-10-29  Tom Tromey  <tom@tromey.com>
 
 	* exec.c (exec_target::close): Don't change current program
diff --git a/gdb/progspace.c b/gdb/progspace.c
index 70c0f7ec2a2..0e7c8d2428e 100644
--- a/gdb/progspace.c
+++ b/gdb/progspace.c
@@ -147,7 +147,6 @@ program_space::~program_space ()
 
   breakpoint_program_space_exit (this);
   no_shared_libraries (NULL, 0);
-  exec_close ();
   free_all_objfiles ();
   /* Defer breakpoint re-set because we don't want to create new
      locations for this pspace which we're tearing down.  */


More information about the Gdb-cvs mailing list