From patchwork Tue Sep 20 11:11:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergio Durigan Junior X-Patchwork-Id: 15791 Received: (qmail 31647 invoked by alias); 20 Sep 2016 11:11:54 -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 31539 invoked by uid 89); 20 Sep 2016 11:11:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.0 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=notifications, During X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 20 Sep 2016 11:11:46 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E80003D942 for ; Tue, 20 Sep 2016 11:11:44 +0000 (UTC) Received: from psique.yyz.redhat.com (unused-10-15-17-193.yyz.redhat.com [10.15.17.193]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8KBBi7c022359; Tue, 20 Sep 2016 07:11:44 -0400 From: Sergio Durigan Junior To: GDB Patches Cc: palves@redhat.com, Sergio Durigan Junior Subject: [PATCH] Use 'event_ptid' instead of 'resume_ptid' on startup_inferior (fix for regression on my last commit) Date: Tue, 20 Sep 2016 07:11:30 -0400 Message-Id: <1474369890-9602-1-git-send-email-sergiodj@redhat.com> In-Reply-To: References: X-IsSubscribed: yes Pedro pointed out a regression happening on gdb.mi/mi-exec-run.exp, and as it turned out, this was a thinko when dealing with some events on startup_inferior. Basically, one needs to pass 'event_ptid' to target_mourn_inferior, but I mistakenly passed 'resume_ptid'. This commit fixes it. Built and regtested on BuildBot, now with fixed e-mail notifications! gdb/ChangeLog: 2016-09-20 Sergio Durigan Junior * fork-inferior.c (startup_inferior): Pass 'event_ptid' instead of 'resume_ptid' to 'target_mourn_inferior'. Fix regression introduced by my last commit. --- gdb/ChangeLog | 6 ++++++ gdb/fork-child.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 26b97e6..0dacaf6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2016-09-20 Sergio Durigan Junior + + * fork-inferior.c (startup_inferior): Pass 'event_ptid' instead of + 'resume_ptid' to 'target_mourn_inferior'. Fix regression + introduced by my last commit. + 2016-09-19 Pedro Alves * common/gdb_locale.h [!ENABLE_NLS] (gettext, dgettext, dcgettext, diff --git a/gdb/fork-child.c b/gdb/fork-child.c index f367507..15f8249 100644 --- a/gdb/fork-child.c +++ b/gdb/fork-child.c @@ -482,7 +482,7 @@ startup_inferior (int ntraps) case TARGET_WAITKIND_SIGNALLED: target_terminal_ours (); - target_mourn_inferior (resume_ptid); + target_mourn_inferior (event_ptid); error (_("During startup program terminated with signal %s, %s."), gdb_signal_to_name (ws.value.sig), gdb_signal_to_string (ws.value.sig)); @@ -490,7 +490,7 @@ startup_inferior (int ntraps) case TARGET_WAITKIND_EXITED: target_terminal_ours (); - target_mourn_inferior (resume_ptid); + target_mourn_inferior (event_ptid); if (ws.value.integer) error (_("During startup program exited with code %d."), ws.value.integer);