From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20287 invoked by alias); 6 Sep 2010 14:52:26 -0000 Received: (qmail 20225 invoked by uid 22791); 6 Sep 2010 14:52:25 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 06 Sep 2010 14:51:42 +0000 Received: (qmail 26298 invoked from network); 6 Sep 2010 14:51:40 -0000 Received: from unknown (HELO ?192.168.0.100?) (yao@127.0.0.2) by mail.codesourcery.com with ESMTPA; 6 Sep 2010 14:51:40 -0000 Message-ID: <4C84FFEF.2020709@codesourcery.com> Date: Mon, 06 Sep 2010 14:58:00 -0000 From: Yao Qi User-Agent: Thunderbird 2.0.0.24 (X11/20100411) MIME-Version: 1.0 To: gdb-patches@sourceware.org CC: Pedro Alves Subject: [gdbserver, patch] Restore current_inferior on return Content-Type: multipart/mixed; boundary="------------000904070801030105000608" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-09/txt/msg00159.txt.bz2 This is a multi-part message in MIME format. --------------000904070801030105000608 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-length: 218 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 --------------000904070801030105000608 Content-Type: text/x-patch; name="restore_current_inferior.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="restore_current_inferior.patch" Content-length: 802 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; } --------------000904070801030105000608--