GDBserver
Classes | Macros | Functions | Variables
gdbthread.h File Reference
#include "common-gdbthread.h"
#include "inferiors.h"
#include <list>

Go to the source code of this file.

Classes

struct  thread_info
 

Macros

#define current_ptid   (current_thread->id)
 

Functions

void remove_thread (struct thread_info *thread)
 
struct thread_infoadd_thread (ptid_t ptid, void *target_data)
 
struct thread_infoget_first_thread (void)
 
struct thread_infofind_thread_ptid (ptid_t ptid)
 
struct thread_infofind_any_thread_of_pid (int pid)
 
template<typename Func >
static thread_infofind_thread (Func func)
 
template<typename Func >
static thread_infofind_thread (int pid, Func func)
 
template<typename Func >
static thread_infofind_thread (ptid_t filter, Func func)
 
template<typename Func >
static void for_each_thread (Func func)
 
template<typename Func >
static void for_each_thread (int pid, Func func)
 
template<typename Func >
static thread_infofind_thread_in_random (Func func)
 
static ptid_t ptid_of (const thread_info *thread)
 
static int pid_of (const thread_info *thread)
 
static long lwpid_of (const thread_info *thread)
 
struct cleanupmake_cleanup_restore_current_thread (void)
 

Variables

std::list< thread_info * > all_threads
 

Macro Definition Documentation

◆ current_ptid

#define current_ptid   (current_thread->id)

Function Documentation

◆ add_thread()

struct thread_info* add_thread ( ptid_t  ptid,
void *  target_data 
)

◆ find_any_thread_of_pid()

struct thread_info* find_any_thread_of_pid ( int  pid)

◆ find_thread() [1/3]

template<typename Func >
static thread_info* find_thread ( Func  func)
static

◆ find_thread() [2/3]

template<typename Func >
static thread_info* find_thread ( int  pid,
Func  func 
)
static

Definition at line 118 of file gdbthread.h.

References find_thread(), thread_info::id, and ptid_t::pid().

◆ find_thread() [3/3]

template<typename Func >
static thread_info* find_thread ( ptid_t  filter,
Func  func 
)
static

Definition at line 131 of file gdbthread.h.

References find_thread(), thread_info::id, and ptid_t::matches().

◆ find_thread_in_random()

template<typename Func >
static thread_info* find_thread_in_random ( Func  func)
static

Definition at line 173 of file gdbthread.h.

References find_thread(), for_each_thread(), and gdb_assert.

Referenced by linux_wait_for_event_filtered().

◆ find_thread_ptid()

struct thread_info* find_thread_ptid ( ptid_t  ptid)

◆ for_each_thread() [1/2]

template<typename Func >
static void for_each_thread ( Func  func)
static

◆ for_each_thread() [2/2]

template<typename Func >
static void for_each_thread ( int  pid,
Func  func 
)
static

Definition at line 159 of file gdbthread.h.

References for_each_thread(), thread_info::id, and ptid_t::pid().

◆ get_first_thread()

struct thread_info* get_first_thread ( void  )

◆ lwpid_of()

static long lwpid_of ( const thread_info thread)
inlinestatic

◆ make_cleanup_restore_current_thread()

struct cleanup* make_cleanup_restore_current_thread ( void  )

◆ pid_of()

static int pid_of ( const thread_info thread)
inlinestatic

◆ ptid_of()

static ptid_t ptid_of ( const thread_info thread)
inlinestatic

◆ remove_thread()

void remove_thread ( struct thread_info thread)

Variable Documentation

◆ all_threads

std::list<thread_info *> all_threads