This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA] Remove unnecessary call to save_current_inferior


Hi.
AFAICT the call to save_current_inferior here is unnecessary.

Regression tested on amd64-linux.

Ok to check in?

2013-08-29  Doug Evans  <dje@google.com>

	* progspace.c (save_current_space_and_thread): Remove unnecessary
	call to save_current_inferior.

Index: progspace.c
===================================================================
RCS file: /cvs/src/src/gdb/progspace.c,v
retrieving revision 1.18
diff -u -p -r1.18 progspace.c
--- progspace.c	28 Aug 2013 17:52:03 -0000	1.18
+++ progspace.c	29 Aug 2013 17:58:15 -0000
@@ -471,7 +471,8 @@ save_current_space_and_thread (void)
   /* If restoring to null thread, we need to restore the pspace as
      well, hence, we need to save the current program space first.  */
   old_chain = save_current_program_space ();
-  save_current_inferior ();
+  /* There's no need to save the current inferior here.
+     That is handled by make_cleanup_restore_current_thread.  */
   make_cleanup_restore_current_thread ();
 
   return old_chain;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]