Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Sergio Durigan Junior <sergiodj@redhat.com>
To: GDB Patches <gdb-patches@sourceware.org>
Cc: palves@redhat.com, Sergio Durigan Junior <sergiodj@redhat.com>
Subject: [PATCH] Use 'event_ptid' instead of 'resume_ptid' on startup_inferior (fix for regression on my last commit)
Date: Tue, 20 Sep 2016 11:13:00 -0000	[thread overview]
Message-ID: <1474369890-9602-1-git-send-email-sergiodj@redhat.com> (raw)
In-Reply-To: <ee3afe33-2d77-af62-925d-6f309d980ce5@redhat.com>

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  <sergiodj@redhat.com>

	* 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  <sergiodj@redhat.com>
+
+	* 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  <palves@redhat.com>
 
 	* 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);
-- 
2.7.4


  parent reply	other threads:[~2016-09-20 11:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-12  4:52 [PATCH] Consolidate target_mourn_inferior between GDB and gdbserver Sergio Durigan Junior
2016-09-15 15:51 ` Pedro Alves
2016-09-19  4:19   ` Sergio Durigan Junior
2016-09-19 14:39     ` Pedro Alves
2016-09-19 17:07       ` Sergio Durigan Junior
2016-09-20 11:13       ` Sergio Durigan Junior [this message]
2016-09-20 11:18         ` [PATCH] Use 'event_ptid' instead of 'resume_ptid' on startup_inferior (fix for regression on my last commit) Pedro Alves
2016-09-20 12:32           ` Sergio Durigan Junior
2016-09-23 13:59     ` [PATCH] Consolidate target_mourn_inferior between GDB and gdbserver Jon Turney
2016-09-23 15:45       ` 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=1474369890-9602-1-git-send-email-sergiodj@redhat.com \
    --to=sergiodj@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.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