Use 'event_ptid' instead of 'resume_ptid' on startup_inferior (fix for regression...
authorSergio Durigan Junior <sergiodj@redhat.com>
Mon, 19 Sep 2016 21:00:22 +0000 (17:00 -0400)
committerSergio Durigan Junior <sergiodj@redhat.com>
Tue, 20 Sep 2016 11:10:26 +0000 (07:10 -0400)
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
gdb/fork-child.c

index 26b97e6687c84eaba4c75c978025fbfa8c0d82f5..0dacaf6767941ea3a8fdf258ed0f14bac0916239 100644 (file)
@@ -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,
index f367507c368fe8e5dbb94ef1a1e0188fdac9d182..15f82499db2f51c37bc472c7d67b5c399bd47a41 100644 (file)
@@ -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);