Don't allow non-stack memory writes in the prologue for nios2.
[deliverable/binutils-gdb.git] / gdb / thread.c
index ec398f578d2f97e05d0147139af179e21a6765b1..23dfcc915c516fa46a06bdba73a679138621e830 100644 (file)
@@ -625,16 +625,29 @@ thread_alive (struct thread_info *tp)
 void
 prune_threads (void)
 {
-  struct thread_info *tp, *next;
+  struct thread_info *tp, *tmp;
 
-  for (tp = thread_list; tp; tp = next)
+  ALL_THREADS_SAFE (tp, tmp)
     {
-      next = tp->next;
       if (!thread_alive (tp))
        delete_thread (tp->ptid);
     }
 }
 
+/* See gdbthreads.h.  */
+
+void
+delete_exited_threads (void)
+{
+  struct thread_info *tp, *tmp;
+
+  ALL_THREADS_SAFE (tp, tmp)
+    {
+      if (tp->state == THREAD_EXITED)
+       delete_thread (tp->ptid);
+    }
+}
+
 /* Disable storing stack temporaries for the thread whose id is
    stored in DATA.  */
 
@@ -1791,8 +1804,7 @@ Usage: thread find REGEXP\n\
 Will display thread ids whose name, target ID, or extra info matches REGEXP."),
           &thread_cmd_list);
 
-  if (!xdb_commands)
-    add_com_alias ("t", "thread", class_run, 1);
+  add_com_alias ("t", "thread", class_run, 1);
 
   add_setshow_boolean_cmd ("thread-events", no_class,
          &print_thread_events, _("\
This page took 0.023875 seconds and 4 git commands to generate.