aboutsummaryrefslogtreecommitdiff
path: root/gdb/linux-thread-db.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2022-11-29 11:28:58 -0500
committerSimon Marchi <simon.marchi@efficios.com>2022-12-01 11:25:18 -0500
commit616d7b31c8f468043bf6b858cbcb42fee6a86a9a (patch)
treebb57aee5eb9f988cfe0fca91385b25749fba84d7 /gdb/linux-thread-db.c
parentb7e7acf7860f6af55995842fb9148904101fd812 (diff)
downloadgdb-616d7b31c8f468043bf6b858cbcb42fee6a86a9a.zip
gdb-616d7b31c8f468043bf6b858cbcb42fee6a86a9a.tar.gz
gdb-616d7b31c8f468043bf6b858cbcb42fee6a86a9a.tar.bz2
gdb: remove prune_threads in thread_db_target::update_thread_list
Pedro mentioned that this prune_threads call in thread_db_target::update_thread_list was not needed, and it was probably an oversight to leave it there in the work following commit e8032dde10b ("Push pruning old threads down to the target"). That commit changed the "find new threads" target operation to "update thread list", making the target responsible of adding new threads and removing exited threads, rather than just adding new threads. Commit e8032dde10b moved the prune_threads calls previously done in common code into each target's update_thread_list method, in order to keep the existing behavior, which is why this prune_threads call ended up there. In the mean time, the linux-nat target was taught to update_thread_list, and thread_db_target::update_thread_list defers to that for any live inferior, so the prune_threads call is not needed there. Otherwise, the thread_db_target::update_thread_list implementation based on td_ta_thr_iter_p only knows how to add new threads, not how to delete exited threads, but that is only used for non-live inferiors, where threads can't exit anyway. So the prune_threads call is not needed for that case either. Change-Id: I127fd4f84c25086f97853dadf34c5cec6816840d Approved-By: Pedro Alves <pedro@palves.net>
Diffstat (limited to 'gdb/linux-thread-db.c')
-rw-r--r--gdb/linux-thread-db.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index 839271c..91a8fb8 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -1618,8 +1618,6 @@ thread_db_target::update_thread_list ()
{
struct thread_db_info *info;
- prune_threads ();
-
for (inferior *inf : all_inferiors ())
{
if (inf->pid == 0)