Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] Remove unnecessary call to save_current_inferior
@ 2013-08-29 18:12 Doug Evans
  2013-09-02 19:05 ` Pedro Alves
  2013-09-03 20:33 ` Pedro Alves
  0 siblings, 2 replies; 5+ messages in thread
From: Doug Evans @ 2013-08-29 18:12 UTC (permalink / raw)
  To: gdb-patches

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;


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-09-03 20:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-29 18:12 [RFA] Remove unnecessary call to save_current_inferior Doug Evans
2013-09-02 19:05 ` Pedro Alves
2013-09-03 20:17   ` Doug Evans
2013-09-03 20:32     ` Pedro Alves
2013-09-03 20:33 ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox