94 template <
typename Func>
98 std::list<thread_info *>::iterator next, cur =
all_threads.begin ();
116 template <
typename Func>
122 return thread->
id.
pid () == pid && func (thread);
129 template <
typename Func>
134 return thread->
id.
matches (filter) && func (thread);
140 template <
typename Func>
144 std::list<thread_info *>::iterator next, cur =
all_threads.begin ();
157 template <
typename Func>
163 if (pid == thread->
id.
pid ())
171 template <
typename Func>
188 random_selector = (int)
189 ((count * (
double) rand ()) / (RAND_MAX + 1.0));
192 return func (thread) && (random_selector-- == 0);
201 #define current_ptid (current_thread->id) 216 return thread->
id.
pid ();
224 return thread->
id.
lwp ();
constexpr int pid() const
constexpr long lwp() const
struct thread_info * find_thread_ptid(ptid_t ptid)
struct btrace_target_info * btrace
static long lwpid_of(const thread_info *thread)
static ptid_t ptid_of(const thread_info *thread)
static thread_info * find_thread(Func func)
struct thread_info * find_any_thread_of_pid(int pid)
constexpr bool matches(const ptid_t &filter) const
struct wstep_state * while_stepping
static void for_each_thread(Func func)
static int pid_of(const thread_info *thread)
enum resume_kind last_resume_kind
struct regcache * regcache_data
struct thread_info * get_first_thread(void)
std::list< thread_info * > all_threads
struct cleanup * make_cleanup_restore_current_thread(void)
struct target_waitstatus last_status
void remove_thread(struct thread_info *thread)
static thread_info * find_thread_in_random(Func func)
struct thread_info * add_thread(ptid_t ptid, void *target_data)