From patchwork Wed Sep 28 23:30:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 16135 Received: (qmail 28740 invoked by alias); 28 Sep 2016 23:30:31 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 28712 invoked by uid 89); 28 Sep 2016 23:30:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=UD:kind, 2488 X-HELO: mail-pf0-f196.google.com Received: from mail-pf0-f196.google.com (HELO mail-pf0-f196.google.com) (209.85.192.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 28 Sep 2016 23:30:20 +0000 Received: by mail-pf0-f196.google.com with SMTP id 21so2716461pfy.1 for ; Wed, 28 Sep 2016 16:30:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=qJbQFHNSChlczU5akHSUDyZlentj3S1R5xQkqv5sVZM=; b=PJ9sipuDzby7d/lUhERWhyklUIu6mf9uOSKY6NbFGt7KxIpJdfRnvVL3Gr6vuBVGsB H3Bscz3hT150YN7NEUSiZJ1f7cptbO6IY13Gt9pjQBGVPaBGVYoxBvg4pfmF3bTScIGF OnrDmXsLt1a1deV+3qAsXR55R7skBY3Wl2lnxLRoVbwxME+GiVkb5JJ77Rre9QidXZmA D4nLiXn1UY26VtCvg/T0mhMb/oe2M0uwZM5qNu/v58PY6PgLRTBH6Gp2d6W729euxWaw eprMwI41Y2aeL5/kBC3vtbfI+V0ML1Q+sfefjvi8Bea1DzZ68JtcvOqnlgmwdRUaXOZw X5sA== X-Gm-Message-State: AA6/9RnZI2fjO5pskDiVV4TCybuk6vNfIRgY2zUACHiV8VWWvGh2yErEMGRXT1aG+YEXaw== X-Received: by 10.98.4.199 with SMTP id 190mr7690688pfe.24.1475105419145; Wed, 28 Sep 2016 16:30:19 -0700 (PDT) Received: from localhost.localdomain (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id d9sm14997108pan.7.2016.09.28.16.30.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 28 Sep 2016 16:30:18 -0700 (PDT) From: Yao Qi X-Google-Original-From: Yao Qi To: gdb-patches@sourceware.org Subject: [PATCH master/7.12] PR 20627: Use resume_stop to stop lwp Date: Thu, 29 Sep 2016 00:30:17 +0100 Message-Id: <1475105417-23047-1-git-send-email-yao.qi@linaro.org> X-IsSubscribed: yes Commit 049a8570 (Use target_continue{,_no_signal} instead of target_resume) replaces the code stopping lwp with target_continue_no_signal in target_stop_and_wait, like this, - resume_info.thread = ptid; - resume_info.kind = resume_stop; - resume_info.sig = GDB_SIGNAL_0; - (*the_target->resume) (&resume_info, 1); + target_continue_no_signal (ptid); the replacement is not equivalent, and it causes PR 20627. This patch is just to revert that change. Regression testing it on x86_64-linux. gdb/gdbserver: 2016-09-28 Yao Qi PR gdbserver/20627 * target.c (target_stop_and_wait): Don't call target_continue_no_signal, use resume_stop instead. --- gdb/gdbserver/target.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gdb/gdbserver/target.c b/gdb/gdbserver/target.c index cf3da47..fd7c714 100644 --- a/gdb/gdbserver/target.c +++ b/gdb/gdbserver/target.c @@ -248,8 +248,12 @@ target_stop_and_wait (ptid_t ptid) { struct target_waitstatus status; int was_non_stop = non_stop; + struct thread_resume resume_info; - target_continue_no_signal (ptid); + resume_info.thread = ptid; + resume_info.kind = resume_stop; + resume_info.sig = GDB_SIGNAL_0; + (*the_target->resume) (&resume_info, 1); non_stop = 1; mywait (ptid, &status, 0, 0);