gdb/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Tue, 20 Jul 2010 12:54:57 +0000 (12:54 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Tue, 20 Jul 2010 12:54:57 +0000 (12:54 +0000)
* linux-nat.c (linux_handle_extended_wait): Handle case when
event == PTRACE_EVENT_CLONE && stopping && WSTOPSIG (status) != SIGSTOP.

gdb/ChangeLog
gdb/linux-nat.c

index f469860ca3beb74473f7d70c18587ceb9b26095b..042d5f5f2eba2b700966b9474ddfd44cd0e44dcb 100644 (file)
@@ -1,3 +1,8 @@
+2010-07-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * linux-nat.c (linux_handle_extended_wait): Handle case when
+       event == PTRACE_EVENT_CLONE && stopping && WSTOPSIG (status) != SIGSTOP.
+
 2010-07-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        Code cleanup.
index b894d848bb6e921daaec8dff34da00e0570ce146..de0ba581da618f03625216b11f9d61b9be120f5f 100644 (file)
@@ -2279,6 +2279,23 @@ linux_handle_extended_wait (struct lwp_info *lp, int status,
              linux_ops->to_resume (linux_ops, pid_to_ptid (new_pid),
                                    0, signo);
            }
+         else
+           {
+             if (status != 0)
+               {
+                 /* We created NEW_LP so it cannot yet contain STATUS.  */
+                 gdb_assert (new_lp->status == 0);
+
+                 /* Save the wait status to report later.  */
+                 if (debug_linux_nat)
+                   fprintf_unfiltered (gdb_stdlog,
+                                       "LHEW: waitpid of new LWP %ld, "
+                                       "saving status %s\n",
+                                       (long) GET_LWP (new_lp->ptid),
+                                       status_to_str (status));
+                 new_lp->status = status;
+               }
+           }
 
          if (debug_linux_nat)
            fprintf_unfiltered (gdb_stdlog,