thread_info *find_thread_in_random
(ptid_t ptid, gdb::function_view<bool (thread_info *)> func);
-/* Get current thread ID (Linux task ID). */
-#define current_ptid (current_thread->id)
-
/* Get the ptid of THREAD. */
static inline ptid_t
std::vector<CORE_ADDR> next_pcs = low_get_next_pcs (regcache);
for (CORE_ADDR pc : next_pcs)
- set_single_step_breakpoint (pc, current_ptid);
+ set_single_step_breakpoint (pc, current_thread->id);
}
int
{
struct single_step_breakpoint *bp;
- gdb_assert (current_ptid.pid () == ptid.pid ());
+ gdb_assert (current_thread->id.pid () == ptid.pid ());
bp = (struct single_step_breakpoint *) set_breakpoint_type_at (single_step_breakpoint,
stop_at, NULL);
if (step || sig || valid_cont_thread)
{
- resume_info[0].thread = current_ptid;
+ resume_info[0].thread = current_thread->id;
if (step)
resume_info[0].kind = resume_step;
else
thread_db_find_new_threads (void)
{
td_err_e err;
- ptid_t ptid = current_ptid;
+ ptid_t ptid = current_thread->id;
struct thread_db *thread_db = current_process ()->priv->thread_db;
int loop, iteration;
run_inferior_command (char *cmd, int len)
{
int err = -1;
- int pid = current_ptid.pid ();
+ int pid = current_thread->id.pid ();
trace_debug ("run_inferior_command: running: %s", cmd);
static ptid_t
current_thread_ptid (void)
{
- return current_ptid;
+ return current_thread->id;
}
/* The current debug event from WaitForDebugEvent. */