Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: gdb-patches@sourceware.org
Subject: [RFA] Remove unnecessary call to save_current_inferior
Date: Thu, 29 Aug 2013 18:12:00 -0000	[thread overview]
Message-ID: <yjt27gf4xt75.fsf@ruffy.mtv.corp.google.com> (raw)

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;


             reply	other threads:[~2013-08-29 18:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-29 18:12 Doug Evans [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yjt27gf4xt75.fsf@ruffy.mtv.corp.google.com \
    --to=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox