aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alves <pedro@palves.net>2022-06-30 13:04:07 +0100
committerPedro Alves <pedro@palves.net>2022-12-12 20:01:20 +0000
commit657a94e242485e6457215763e5c1055502ca6a79 (patch)
tree0820e5a0001911f17e52c31e36e8f6c2d34aba0a
parent1bbadb330060b57fa327c63ae46533d1010c7a16 (diff)
downloadgdb-657a94e242485e6457215763e5c1055502ca6a79.zip
gdb-657a94e242485e6457215763e5c1055502ca6a79.tar.gz
gdb-657a94e242485e6457215763e5c1055502ca6a79.tar.bz2
inferior::clear_thread_list always silent
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
-rw-r--r--gdb/inferior.c12
-rw-r--r--gdb/inferior.h5
-rw-r--r--gdb/thread.c2
3 files changed, 9 insertions, 10 deletions
diff --git a/gdb/inferior.c b/gdb/inferior.c
index 23cbfd6..eacb65e 100644
--- a/gdb/inferior.c
+++ b/gdb/inferior.c
@@ -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);
diff --git a/gdb/inferior.h b/gdb/inferior.h
index 69525a2..07d9527 100644
--- a/gdb/inferior.h
+++ b/gdb/inferior.h
@@ -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
diff --git a/gdb/thread.c b/gdb/thread.c
index 2c45d52..2ca3a86 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -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