diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2021-08-28 10:58:45 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2021-09-27 22:30:11 -0400 |
commit | 901b98215e767bbffb1bfa869e02d7dc5ea786ec (patch) | |
tree | 31da2785d795cdf08419b11c6cfd701f1fa7b248 /gdb/linux-thread-db.c | |
parent | 676362df181a39a5c58bba15f4f7524bfd58b88d (diff) | |
download | binutils-901b98215e767bbffb1bfa869e02d7dc5ea786ec.zip binutils-901b98215e767bbffb1bfa869e02d7dc5ea786ec.tar.gz binutils-901b98215e767bbffb1bfa869e02d7dc5ea786ec.tar.bz2 |
gdb: use intrusive_list for linux-nat lwp_list
Replace the manually maintained linked list of lwp_info objects with
intrusive_list. Replace the ALL_LWPS macro with all_lwps, which returns
a range. Add all_lwps_safe as well, for use in iterate_over_lwps, which
currently iterates in a safe manner.
Change-Id: I355313502510acc0103f5eaf2fbde80897d6376c
Diffstat (limited to 'gdb/linux-thread-db.c')
-rw-r--r-- | gdb/linux-thread-db.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c index bfb3bd6..ac85ea3 100644 --- a/gdb/linux-thread-db.c +++ b/gdb/linux-thread-db.c @@ -920,13 +920,12 @@ try_thread_db_load_1 (struct thread_db_info *info) if (info->td_ta_thr_iter_p == NULL) { - struct lwp_info *lp; int pid = inferior_ptid.pid (); thread_info *curr_thread = inferior_thread (); linux_stop_and_wait_all_lwps (); - ALL_LWPS (lp) + for (const lwp_info *lp : all_lwps ()) if (lp->ptid.pid () == pid) thread_from_lwp (curr_thread, lp->ptid); |