2011-10-24 Pedro Alves <pedro@codesourcery.com>
authorPedro Alves <palves@redhat.com>
Mon, 24 Oct 2011 14:25:52 +0000 (14:25 +0000)
committerPedro Alves <palves@redhat.com>
Mon, 24 Oct 2011 14:25:52 +0000 (14:25 +0000)
gdb/
* linux-nat.c (linux_handle_extended_wait): When handling a clone
event, in non-stop, if not stopping, make sure the new lwp has
last_resume_kind set to resume_continue.  Assert that when we're
resuming the new lwp, its last_resume_kind is resume_continue.

gdb/ChangeLog
gdb/linux-nat.c

index 6f9974e0300feacaff5c3d04ec1518fda8e497e4..30cf1449ca6a4e30ff6fca786fb544bd46316f43 100644 (file)
@@ -1,3 +1,10 @@
+2011-10-24  Pedro Alves  <pedro@codesourcery.com>
+
+       * linux-nat.c (linux_handle_extended_wait): When handling a clone
+       event, in non-stop, if not stopping, make sure the new lwp has
+       last_resume_kind set to resume_continue.  Assert that when we're
+       resuming the new lwp, its last_resume_kind is resume_continue.
+
 2011-10-24  Pedro Alves  <pedro@codesourcery.com>
 
        * infrun.c (handle_inferior_event): Don't assume inferior_ptid is
index f8a15c91213223e694e14a10651e153ed867c8b7..4595c06c1f161d9228489eeec48bf37c03fcfad7 100644 (file)
@@ -2289,6 +2289,9 @@ linux_handle_extended_wait (struct lwp_info *lp, int status,
                {
                  set_running (new_lp->ptid, 1);
                  set_executing (new_lp->ptid, 1);
+                 /* thread_db_attach_lwp -> lin_lwp_attach_lwp forced
+                    resume_stop.  */
+                 new_lp->last_resume_kind = resume_continue;
                }
            }
 
@@ -2316,6 +2319,7 @@ linux_handle_extended_wait (struct lwp_info *lp, int status,
 
              if (status == 0)
                {
+                 gdb_assert (new_lp->last_resume_kind == resume_continue);
                  if (debug_linux_nat)
                    fprintf_unfiltered (gdb_stdlog,
                                        "LHEW: resuming new LWP %ld\n",