35 if (
inf == NULL ||
inf->aspace == NULL)
36 internal_error (_(
"Can't determine the current "
37 "address space of thread %s\n"),
47 gdb_assert (
inf != NULL);
91 const char *execd_pathname)
95 if (orig_inf != follow_inf)
117 if (child_inf !=
nullptr)
135 thread->
ptid.to_string ().c_str ());
149 thread->
ptid.to_string ().c_str ());
166 return thread.
inf ==
inf && thread.ptid.matches (filter_ptid);
171 unsigned int count = std::count_if (l.begin (), l.end (), matches);
178 = (int) ((count * (
double) rand ()) / (RAND_MAX + 1.0));
182 count, random_selector);
185 auto it = std::find_if (l.begin (), l.end (),
186 [&random_selector, &matches]
189 if (!matches (thread))
192 return random_selector-- == 0;
195 gdb_assert (it != l.end ());
208 return inf->find_thread (ptid);
213std::set<process_stratum_target *>
217 std::set<process_stratum_target *> targets;
219 targets.insert (
inf->process_target ());
void push_target(struct target_ops *t)
struct process_stratum_target * process_target()
bool has_all_memory() override
void follow_fork(inferior *child_inf, ptid_t child_ptid, target_waitkind fork_kind, bool follow_child, bool detach_on_fork) override
struct gdbarch * thread_architecture(ptid_t ptid) override
thread_info * find_thread(ptid_t ptid)
thread_info_resumed_with_pending_wait_status_list m_resumed_with_pending_wait_status
~process_stratum_target() override=0
void maybe_remove_resumed_with_pending_wait_status(thread_info *thread)
bool has_registers() override
void follow_exec(inferior *follow_inf, ptid_t ptid, const char *execd_pathname) override
thread_info * random_resumed_with_pending_wait_status(inferior *inf, ptid_t filter_ptid)
bool has_memory() override
struct address_space * thread_address_space(ptid_t ptid) override
bool has_execution(inferior *inf) override
bool has_stack() override
void maybe_add_resumed_with_pending_wait_status(thread_info *thread)
intrusive_list_node< thread_info > resumed_with_pending_wait_status_node
bool has_pending_waitstatus() const
struct thread_info * add_thread(process_stratum_target *targ, ptid_t ptid)
struct thread_info * add_thread_silent(process_stratum_target *targ, ptid_t ptid)
void switch_to_thread(struct thread_info *thr)
struct inferior * find_inferior_ptid(process_stratum_target *targ, ptid_t ptid)
struct inferior * current_inferior(void)
void switch_to_inferior_no_thread(inferior *inf)
all_inferiors_range all_inferiors(process_stratum_target *proc_target=nullptr)
all_non_exited_inferiors_range all_non_exited_inferiors(process_stratum_target *proc_target=nullptr)
#define infrun_debug_printf(fmt,...)
std::set< process_stratum_target * > all_non_exited_process_targets()
void switch_to_target_no_thread(process_stratum_target *target)
std::string target_pid_to_str(ptid_t ptid)