]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
inferior::clear_thread_list always silent
authorPedro Alves <pedro@palves.net>
Thu, 30 Jun 2022 12:04:07 +0000 (13:04 +0100)
committerPedro Alves <pedro@palves.net>
Mon, 12 Dec 2022 20:01:20 +0000 (20:01 +0000)
Now that the MI mi_thread_exit observer ignores "silent", there's no
difference between inferior::clean_thread_list with silent true or
false.  And for the CLI, clean_thread_list() never printed anything
either.  So we can eliminate the 'silent' parameter.

Change-Id: I90ff9f07537d22ea70986fbcfe8819cac7e06613

gdb/inferior.c
gdb/inferior.h
gdb/thread.c

index 23cbfd63bde0823f414c2c331750df420306c5f8..eacb65ec1d7cbc686d17af3f682159b9830fc480 100644 (file)
@@ -168,13 +168,13 @@ add_inferior (int pid)
 /* See inferior.h.  */
 
 void
-inferior::clear_thread_list (bool silent)
+inferior::clear_thread_list ()
 {
   thread_list.clear_and_dispose ([=] (thread_info *thr)
     {
-      threads_debug_printf ("deleting thread %s, silent = %d",
-                           thr->ptid.to_string ().c_str (), silent);
-      set_thread_exited (thr, silent);
+      threads_debug_printf ("deleting thread %s",
+                           thr->ptid.to_string ().c_str ());
+      set_thread_exited (thr, true);
       if (thr->deletable ())
        delete thr;
     });
@@ -184,7 +184,7 @@ inferior::clear_thread_list (bool silent)
 void
 delete_inferior (struct inferior *inf)
 {
-  inf->clear_thread_list (true);
+  inf->clear_thread_list ();
 
   auto it = inferior_list.iterator_to (*inf);
   inferior_list.erase (it);
@@ -204,7 +204,7 @@ delete_inferior (struct inferior *inf)
 static void
 exit_inferior_1 (struct inferior *inf, int silent)
 {
-  inf->clear_thread_list (silent);
+  inf->clear_thread_list ();
 
   gdb::observers::inferior_exit.notify (inf);
 
index 69525a2e053f73ac2be9ec17a6ec2e0d493dd64b..07d9527a802dce83c9b061d9c572317982c482fc 100644 (file)
@@ -425,9 +425,8 @@ public:
   inline safe_inf_threads_range threads_safe ()
   { return safe_inf_threads_range (this->thread_list.begin ()); }
 
-  /* Delete all threads in the thread list.  If SILENT, exit threads
-     silently.  */
-  void clear_thread_list (bool silent);
+  /* Delete all threads in the thread list, silently.  */
+  void clear_thread_list ();
 
   /* Continuations-related methods.  A continuation is an std::function
      to be called to finish the execution of a command when running
index 2c45d528bba8451511a7265fe86adc47a518f140..2ca3a867d8c5042e80606801248dccd7282a6bb6 100644 (file)
@@ -235,7 +235,7 @@ init_thread_list (void)
   highest_thread_num = 0;
 
   for (inferior *inf : all_inferiors ())
-    inf->clear_thread_list (true);
+    inf->clear_thread_list ();
 }
 
 /* Allocate a new thread of inferior INF with target id PTID and add