]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* linux-low.c (gdb_wants_lwp_stopped): Delete.
authorPedro Alves <palves@redhat.com>
Mon, 9 Aug 2010 14:59:23 +0000 (14:59 +0000)
committerPedro Alves <palves@redhat.com>
Mon, 9 Aug 2010 14:59:23 +0000 (14:59 +0000)
(gdb_wants_all_stopped): Delete.
(linux_wait_1): Don't call them.
* server.c (handle_v_cont): Tag all threads as want-stopped.
(gdb_wants_thread_stopped): Fix comments.  Tag the thread that
stopped as "client-wants-stopped".

gdb/gdbserver/ChangeLog
gdb/gdbserver/linux-low.c

index 059fab34cfea3bf640c7edec3f77a5c30c6593d9..9b3a2fc727011802b8da7b428a2b4e80ab5e895b 100644 (file)
@@ -1,3 +1,12 @@
+2010-08-09  Pedro Alves  <pedro@codesourcery.com>
+
+       * linux-low.c (gdb_wants_lwp_stopped): Delete.
+       (gdb_wants_all_stopped): Delete.
+       (linux_wait_1): Don't call them.
+       * server.c (handle_v_cont): Tag all threads as want-stopped.
+       (gdb_wants_thread_stopped): Fix comments.  Tag the thread that
+       stopped as "client-wants-stopped".
+
 2010-07-31  Pedro Alves  <pedro@codesourcery.com>
 
        * Makefile.in (signals_h): New.
index 64007b070aa46e16d8fe9cd02f8499e7c664e279..dbad8c6ae0ba28ce7ac772a1e0f5b415db60b05a 100644 (file)
@@ -1809,24 +1809,6 @@ select_event_lwp (struct lwp_info **orig_lp)
     }
 }
 
-/* Set this inferior LWP's state as "want-stopped".  We won't resume
-   this LWP until the client gives us another action for it.  */
-
-static void
-gdb_wants_lwp_stopped (struct inferior_list_entry *entry)
-{
-  struct lwp_info *lwp = (struct lwp_info *) entry;
-  struct thread_info *thread = get_lwp_thread (lwp);
-
-  /* Most threads are stopped implicitly (all-stop); tag that with
-     signal 0.  The thread being explicitly reported stopped to the
-     client, gets it's status fixed up afterwards.  */
-  thread->last_status.kind = TARGET_WAITKIND_STOPPED;
-  thread->last_status.value.sig = TARGET_SIGNAL_0;
-
-  thread->last_resume_kind = resume_stop;
-}
-
 /* Decrement the suspend count of an LWP.  */
 
 static int
@@ -1853,14 +1835,6 @@ unsuspend_all_lwps (struct lwp_info *except)
   find_inferior (&all_lwps, unsuspend_one_lwp, except);
 }
 
-/* Set all LWP's states as "want-stopped".  */
-
-static void
-gdb_wants_all_stopped (void)
-{
-  for_each_inferior (&all_lwps, gdb_wants_lwp_stopped);
-}
-
 static void move_out_of_jump_pad_callback (struct inferior_list_entry *entry);
 static int stuck_in_jump_pad_callback (struct inferior_list_entry *entry,
                                       void *data);
@@ -2389,8 +2363,6 @@ Check if we're already there.\n",
 
   ourstatus->kind = TARGET_WAITKIND_STOPPED;
 
-  /* Do this before the gdb_wants_all_stopped calls below, since they
-     always set last_resume_kind to resume_stop.  */
   if (current_inferior->last_resume_kind == resume_stop
       && WSTOPSIG (w) == SIGSTOP)
     {
@@ -2413,30 +2385,14 @@ Check if we're already there.\n",
 
   gdb_assert (ptid_equal (step_over_bkpt, null_ptid));
 
-  if (stabilizing_threads)
-    return ptid_of (event_child);
-
-  if (!non_stop)
-    {
-      /* From GDB's perspective, all-stop mode always stops all
-        threads implicitly.  Tag all threads as "want-stopped".  */
-      gdb_wants_all_stopped ();
-    }
-  else
-    {
-      /* We're reporting this LWP as stopped.  Update it's
-        "want-stopped" state to what the client wants, until it gets
-        a new resume action.  */
-      gdb_wants_lwp_stopped (&event_child->head);
-    }
-
   if (debug_threads)
     fprintf (stderr, "linux_wait ret = %s, %d, %d\n",
             target_pid_to_str (ptid_of (event_child)),
             ourstatus->kind,
             ourstatus->value.sig);
 
-  current_inferior->last_status = *ourstatus;
+  if (!stabilizing_threads)
+    current_inferior->last_status = *ourstatus;
 
   return ptid_of (event_child);
 }