public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Yao Qi <yao@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Pedro Alves <pedro@codesourcery.com>
Subject: [gdbserver, patch] Restore current_inferior on return
Date: Mon, 06 Sep 2010 14:58:00 -0000	[thread overview]
Message-ID: <4C84FFEF.2020709@codesourcery.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 218 bytes --]

Hi,
This patch is to fix a bug revealed when my patch "Remove unused
variables" is reviewed.
http://sourceware.org/ml/gdb-patches/2010-09/msg00081.html

-- 
Yao Qi
CodeSourcery
yao@codesourcery.com
(650) 331-3385 x739

[-- Attachment #2: restore_current_inferior.patch --]
[-- Type: text/x-patch, Size: 802 bytes --]

gdbserver/

	* linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
	on return.

diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index f2177ff..76a4df1 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -1244,6 +1244,7 @@ Checking whether LWP %ld needs to move out of the jump pad.\n",
 		fprintf (stderr, "\
 Checking whether LWP %ld needs to move out of the jump pad...it does\n",
 		 lwpid_of (lwp));
+	      current_inferior = saved_inferior;
 
 	      return 1;
 	    }
@@ -1314,6 +1315,8 @@ Checking whether LWP %ld needs to move out of the jump pad...it does\n",
     fprintf (stderr, "\
 Checking whether LWP %ld needs to move out of the jump pad...no\n",
 	     lwpid_of (lwp));
+
+  current_inferior = saved_inferior;
   return 0;
 }
 

             reply	other threads:[~2010-09-06 14:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-06 14:58 Yao Qi [this message]
2010-09-06 15:20 ` Pedro Alves
2010-09-06 16:12   ` Yao Qi

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=4C84FFEF.2020709@codesourcery.com \
    --to=yao@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@codesourcery.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).