GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions | Variables
linux-nat.c File Reference
#include "defs.h"
#include "inferior.h"
#include "infrun.h"
#include "target.h"
#include "nat/linux-nat.h"
#include "nat/linux-waitpid.h"
#include "gdbsupport/gdb_wait.h"
#include <unistd.h>
#include <sys/syscall.h>
#include "nat/gdb_ptrace.h"
#include "linux-nat.h"
#include "nat/linux-ptrace.h"
#include "nat/linux-procfs.h"
#include "nat/linux-personality.h"
#include "linux-fork.h"
#include "gdbthread.h"
#include "gdbcmd.h"
#include "regcache.h"
#include "regset.h"
#include "inf-child.h"
#include "inf-ptrace.h"
#include "auxv.h"
#include <sys/procfs.h>
#include "elf-bfd.h"
#include "gregset.h"
#include "gdbcore.h"
#include <ctype.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "inf-loop.h"
#include "gdbsupport/event-loop.h"
#include "event-top.h"
#include <pwd.h>
#include <sys/types.h>
#include <dirent.h>
#include "xml-support.h"
#include <sys/vfs.h>
#include "solib.h"
#include "nat/linux-osdata.h"
#include "linux-tdep.h"
#include "symfile.h"
#include "gdbsupport/agent.h"
#include "tracepoint.h"
#include "gdbsupport/buffer.h"
#include "target-descriptions.h"
#include "gdbsupport/filestuff.h"
#include "objfiles.h"
#include "nat/linux-namespaces.h"
#include "gdbsupport/block-signals.h"
#include "gdbsupport/fileio.h"
#include "gdbsupport/scope-exit.h"
#include "gdbsupport/gdb-sigmask.h"
#include "gdbsupport/common-debug.h"
#include <unordered_map>

Go to the source code of this file.

Classes

struct  simple_pid_list
 
struct  lwp_deleter
 
class  proc_mem_file
 

Macros

#define O_LARGEFILE   0
 
#define linux_nat_debug_printf(fmt, ...)    debug_prefixed_printf_cond (debug_linux_nat, "linux-nat", fmt, ##__VA_ARGS__)
 
#define LINUX_NAT_SCOPED_DEBUG_ENTER_EXIT    scoped_debug_enter_exit (debug_linux_nat, "linux-nat")
 

Typedefs

typedef std::unique_ptr< struct lwp_info, lwp_deleterlwp_info_up
 

Functions

static void show_debug_linux_nat (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static int kill_lwp (int lwpid, int signo)
 
static int stop_callback (struct lwp_info *lp)
 
static void block_child_signals (sigset_t *prev_mask)
 
static void restore_child_signals_mask (sigset_t *prev_mask)
 
static struct lwp_infoadd_lwp (ptid_t ptid)
 
static void purge_lwp_list (int pid)
 
static void delete_lwp (ptid_t ptid)
 
static struct lwp_infofind_lwp_pid (ptid_t ptid)
 
static int lwp_status_pending_p (struct lwp_info *lp)
 
static void save_stop_reason (struct lwp_info *lp)
 
static bool proc_mem_file_is_writable ()
 
static void close_proc_mem_file (pid_t pid)
 
static void open_proc_mem_file (ptid_t ptid)
 
static bool is_leader (lwp_info *lp)
 
ptid_t ptid_of_lwp (struct lwp_info *lwp)
 
void lwp_set_arch_private_info (struct lwp_info *lwp, struct arch_lwp_info *info)
 
struct arch_lwp_infolwp_arch_private_info (struct lwp_info *lwp)
 
int lwp_is_stopped (struct lwp_info *lwp)
 
enum target_stop_reason lwp_stop_reason (struct lwp_info *lwp)
 
int lwp_is_stepping (struct lwp_info *lwp)
 
static void add_to_pid_list (struct simple_pid_list **listp, int pid, int status)
 
static int pull_pid_from_list (struct simple_pid_list **listp, int pid, int *statusp)
 
static int linux_nat_ptrace_options (int attached)
 
static void linux_init_ptrace_procfs (pid_t pid, int attached)
 
static int num_lwps (int pid)
 
static hashval_t lwp_info_hash (const void *ap)
 
static int lwp_lwpid_htab_eq (const void *a, const void *b)
 
static void lwp_lwpid_htab_create (void)
 
static void lwp_lwpid_htab_add_lwp (struct lwp_info *lp)
 
lwp_info_range all_lwps ()
 
lwp_info_safe_range all_lwps_safe ()
 
static void lwp_list_add (struct lwp_info *lp)
 
static void lwp_list_remove (struct lwp_info *lp)
 
static int stop_wait_callback (struct lwp_info *lp)
 
static int resume_stopped_resumed_lwps (struct lwp_info *lp, const ptid_t wait_ptid)
 
static int check_ptrace_stopped_lwp_gone (struct lwp_info *lp)
 
static int lwp_lwpid_htab_remove_pid (void **slot, void *info)
 
static struct lwp_infoadd_initial_lwp (ptid_t ptid)
 
struct lwp_infoiterate_over_lwps (ptid_t filter, gdb::function_view< iterate_over_lwps_ftype > callback)
 
void linux_nat_switch_fork (ptid_t new_ptid)
 
static void exit_lwp (struct lwp_info *lp)
 
static int linux_nat_post_attach_wait (ptid_t ptid, int *signalled)
 
static int attach_proc_task_lwp_callback (ptid_t ptid)
 
static void detach_one_pid (int pid, int signo)
 
static int get_detach_signal (struct lwp_info *lp)
 
static void detach_one_lwp (struct lwp_info *lp, int *signo_p)
 
static int detach_callback (struct lwp_info *lp)
 
static void linux_resume_one_lwp_throw (struct lwp_info *lp, int step, enum gdb_signal signo)
 
static void linux_resume_one_lwp (struct lwp_info *lp, int step, enum gdb_signal signo)
 
static void resume_lwp (struct lwp_info *lp, int step, enum gdb_signal signo)
 
static int linux_nat_resume_callback (struct lwp_info *lp, struct lwp_info *except)
 
static int resume_clear_callback (struct lwp_info *lp)
 
static int resume_set_callback (struct lwp_info *lp)
 
static int linux_handle_syscall_trap (struct lwp_info *lp, int stopping)
 
static int linux_handle_extended_wait (struct lwp_info *lp, int status)
 
static void wait_for_signal ()
 
static int wait_lwp (struct lwp_info *lp)
 
void linux_stop_lwp (struct lwp_info *lwp)
 
void linux_stop_and_wait_all_lwps (void)
 
void linux_unstop_all_lwps (void)
 
static int linux_nat_has_pending_sigint (int pid)
 
static int set_ignore_sigint (struct lwp_info *lp)
 
static void maybe_clear_ignore_sigint (struct lwp_info *lp)
 
static int check_stopped_by_watchpoint (struct lwp_info *lp)
 
static int status_callback (struct lwp_info *lp)
 
static int count_events_callback (struct lwp_info *lp, int *count)
 
static int select_singlestep_lwp_callback (struct lwp_info *lp)
 
static int select_event_lwp_callback (struct lwp_info *lp, int *selector)
 
static void select_event_lwp (ptid_t filter, struct lwp_info **orig_lp, int *status)
 
static int resumed_callback (struct lwp_info *lp)
 
static void linux_nat_filter_event (int lwpid, int status)
 
static void check_zombie_leaders (void)
 
static ptid_t filter_exit_event (struct lwp_info *event_child, struct target_waitstatus *ourstatus)
 
static ptid_t linux_nat_wait_1 (ptid_t ptid, struct target_waitstatus *ourstatus, target_wait_flags target_options)
 
static void kill_one_lwp (pid_t pid)
 
static void kill_wait_one_lwp (pid_t pid)
 
static int kill_callback (struct lwp_info *lp)
 
static int kill_wait_callback (struct lwp_info *lp)
 
static void kill_unfollowed_fork_children (struct inferior *inf)
 
static void siginfo_fixup (siginfo_t *siginfo, gdb_byte *inf_siginfo, int direction)
 
static enum target_xfer_status linux_xfer_siginfo (ptid_t ptid, enum target_object object, const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, ULONGEST len, ULONGEST *xfered_len)
 
static enum target_xfer_status linux_nat_xfer_osdata (enum target_object object, const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, ULONGEST len, ULONGEST *xfered_len)
 
static enum target_xfer_status linux_proc_xfer_memory_partial (int pid, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len, ULONGEST *xfered_len)
 
static enum target_xfer_status linux_proc_xfer_memory_partial_fd (int fd, int pid, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len, ULONGEST *xfered_len)
 
static void add_line_to_sigset (const char *line, sigset_t *sigs)
 
void linux_proc_pending_signals (int pid, sigset_t *pending, sigset_t *blocked, sigset_t *ignored)
 
static void sigchld_handler (int signo)
 
static void handle_target_event (int error, gdb_client_data client_data)
 
static int linux_nat_stop_lwp (struct lwp_info *lwp)
 
static pid_t linux_nat_fileio_pid_of (struct inferior *inf)
 
bool linux_nat_get_siginfo (ptid_t ptid, siginfo_t *siginfo)
 
ptid_t current_lwp_ptid (void)
 
void _initialize_linux_nat ()
 
unsigned int lin_thread_get_thread_signal_num (void)
 
int lin_thread_get_thread_signal (unsigned int i)
 

Variables

struct linux_nat_targetlinux_target
 
enum tribool have_ptrace_getregset = TRIBOOL_UNKNOWN
 
static bool debug_linux_nat
 
static struct simple_pid_liststopped_pids
 
static int report_thread_events
 
static htab_t lwp_lwpid_htab
 
static intrusive_list< lwp_infolwp_list
 
static sigset_t suspend_mask
 
static sigset_t blocked_mask
 
static struct sigaction sigchld_action
 
static sigset_t pass_mask
 
static std::unordered_map< int, proc_mem_fileproc_mem_file_map
 
static int lin_thread_signals [] = { __SIGRTMIN, __SIGRTMIN + 1 }
 

Macro Definition Documentation

◆ linux_nat_debug_printf

#define linux_nat_debug_printf (   fmt,
  ... 
)     debug_prefixed_printf_cond (debug_linux_nat, "linux-nat", fmt, ##__VA_ARGS__)

Definition at line 211 of file linux-nat.c.

◆ LINUX_NAT_SCOPED_DEBUG_ENTER_EXIT

#define LINUX_NAT_SCOPED_DEBUG_ENTER_EXIT    scoped_debug_enter_exit (debug_linux_nat, "linux-nat")

Definition at line 216 of file linux-nat.c.

◆ O_LARGEFILE

#define O_LARGEFILE   0

Definition at line 187 of file linux-nat.c.

Typedef Documentation

◆ lwp_info_up

typedef std::unique_ptr<struct lwp_info, lwp_deleter> lwp_info_up

Definition at line 421 of file linux-nat.c.

Function Documentation

◆ _initialize_linux_nat()

void _initialize_linux_nat ( )

Definition at line 4463 of file linux-nat.c.

Referenced by initialize_all_files().

◆ add_initial_lwp()

static struct lwp_info * add_initial_lwp ( ptid_t  ptid)
static

◆ add_line_to_sigset()

static void add_line_to_sigset ( const char *  line,
sigset_t *  sigs 
)
static

Definition at line 4014 of file linux-nat.c.

Referenced by linux_proc_pending_signals().

◆ add_lwp()

static struct lwp_info * add_lwp ( ptid_t  ptid)
static

◆ add_to_pid_list()

static void add_to_pid_list ( struct simple_pid_list **  listp,
int  pid,
int  status 
)
static

◆ all_lwps()

lwp_info_range all_lwps ( )

◆ all_lwps_safe()

lwp_info_safe_range all_lwps_safe ( )

Definition at line 634 of file linux-nat.c.

References lwp_list.

Referenced by iterate_over_lwps().

◆ attach_proc_task_lwp_callback()

static int attach_proc_task_lwp_callback ( ptid_t  ptid)
static

◆ block_child_signals()

static void block_child_signals ( sigset_t *  prev_mask)
static

Definition at line 673 of file linux-nat.c.

References blocked_mask.

Referenced by linux_nat_wait_1(), and wait_lwp().

◆ check_ptrace_stopped_lwp_gone()

static int check_ptrace_stopped_lwp_gone ( struct lwp_info lp)
static

◆ check_stopped_by_watchpoint()

static int check_stopped_by_watchpoint ( struct lwp_info lp)
static

◆ check_zombie_leaders()

static void check_zombie_leaders ( void  )
static

◆ close_proc_mem_file()

static void close_proc_mem_file ( pid_t  pid)
static

◆ count_events_callback()

static int count_events_callback ( struct lwp_info lp,
int *  count 
)
static

Definition at line 2467 of file linux-nat.c.

References lwp_status_pending_p(), and lwp_info::resumed.

Referenced by select_event_lwp().

◆ current_lwp_ptid()

ptid_t current_lwp_ptid ( void  )

◆ delete_lwp()

static void delete_lwp ( ptid_t  ptid)
static

Definition at line 808 of file linux-nat.c.

References dummy, lwp_list_remove(), lwp_lwpid_htab, and lwp_info::ptid.

Referenced by detach_one_lwp(), exit_lwp(), and lwp_deleter::operator()().

◆ detach_callback()

static int detach_callback ( struct lwp_info lp)
static

Definition at line 1373 of file linux-nat.c.

References detach_one_lwp(), and lwp_info::ptid.

Referenced by linux_nat_target::detach().

◆ detach_one_lwp()

static void detach_one_lwp ( struct lwp_info lp,
int *  signo_p 
)
static

◆ detach_one_pid()

static void detach_one_pid ( int  pid,
int  signo 
)
static

Definition at line 1150 of file linux-nat.c.

References __WALL, linux_nat_debug_printf, my_waitpid(), pid, ptrace, and status.

Referenced by detach_one_lwp().

◆ exit_lwp()

static void exit_lwp ( struct lwp_info lp)
static

◆ filter_exit_event()

static ptid_t filter_exit_event ( struct lwp_info event_child,
struct target_waitstatus ourstatus 
)
static

◆ find_lwp_pid()

static struct lwp_info * find_lwp_pid ( ptid_t  ptid)
static

◆ get_detach_signal()

static int get_detach_signal ( struct lwp_info lp)
static

◆ handle_target_event()

static void handle_target_event ( int  error,
gdb_client_data  client_data 
)
static

Definition at line 4208 of file linux-nat.c.

References INF_REG_EVENT, and inferior_event_handler().

◆ is_leader()

static bool is_leader ( lwp_info lp)
static

Definition at line 254 of file linux-nat.c.

References lwp_info::ptid.

Referenced by filter_exit_event(), and linux_nat_filter_event().

◆ iterate_over_lwps()

struct lwp_info * iterate_over_lwps ( ptid_t  filter,
gdb::function_view< iterate_over_lwps_ftype callback 
)

◆ kill_callback()

static int kill_callback ( struct lwp_info lp)
static

Definition at line 3497 of file linux-nat.c.

References kill_one_lwp(), and lwp_info::ptid.

Referenced by linux_nat_target::kill().

◆ kill_lwp()

static int kill_lwp ( int  lwpid,
int  signo 
)
static

◆ kill_one_lwp()

static void kill_one_lwp ( pid_t  pid)
static

◆ kill_unfollowed_fork_children()

static void kill_unfollowed_fork_children ( struct inferior inf)
static

◆ kill_wait_callback()

static int kill_wait_callback ( struct lwp_info lp)
static

Definition at line 3506 of file linux-nat.c.

References kill_wait_one_lwp(), and lwp_info::ptid.

Referenced by linux_nat_target::kill().

◆ kill_wait_one_lwp()

static void kill_wait_one_lwp ( pid_t  pid)
static

◆ lin_thread_get_thread_signal()

int lin_thread_get_thread_signal ( unsigned int  i)

Definition at line 4521 of file linux-nat.c.

References lin_thread_get_thread_signal_num(), and lin_thread_signals.

Referenced by check_thread_signals().

◆ lin_thread_get_thread_signal_num()

unsigned int lin_thread_get_thread_signal_num ( void  )

Definition at line 4513 of file linux-nat.c.

References lin_thread_signals.

Referenced by check_thread_signals(), and lin_thread_get_thread_signal().

◆ linux_handle_extended_wait()

static int linux_handle_extended_wait ( struct lwp_info lp,
int  status 
)
static

◆ linux_handle_syscall_trap()

static int linux_handle_syscall_trap ( struct lwp_info lp,
int  stopping 
)
static

◆ linux_init_ptrace_procfs()

static void linux_init_ptrace_procfs ( pid_t  pid,
int  attached 
)
static

◆ linux_nat_fileio_pid_of()

static pid_t linux_nat_fileio_pid_of ( struct inferior inf)
static

◆ linux_nat_filter_event()

static void linux_nat_filter_event ( int  lwpid,
int  status 
)
static

◆ linux_nat_get_siginfo()

bool linux_nat_get_siginfo ( ptid_t  ptid,
siginfo_t *  siginfo 
)

◆ linux_nat_has_pending_sigint()

static int linux_nat_has_pending_sigint ( int  pid)
static

Definition at line 2220 of file linux-nat.c.

References linux_proc_pending_signals(), and pid.

Referenced by maybe_clear_ignore_sigint().

◆ linux_nat_post_attach_wait()

static int linux_nat_post_attach_wait ( ptid_t  ptid,
int *  signalled 
)
static

◆ linux_nat_ptrace_options()

static int linux_nat_ptrace_options ( int  attached)
static

◆ linux_nat_resume_callback()

static int linux_nat_resume_callback ( struct lwp_info lp,
struct lwp_info except 
)
static

◆ linux_nat_stop_lwp()

static int linux_nat_stop_lwp ( struct lwp_info lwp)
static

◆ linux_nat_switch_fork()

void linux_nat_switch_fork ( ptid_t  new_ptid)

◆ linux_nat_wait_1()

static ptid_t linux_nat_wait_1 ( ptid_t  ptid,
struct target_waitstatus ourstatus,
target_wait_flags  target_options 
)
static

◆ linux_nat_xfer_osdata()

static enum target_xfer_status linux_nat_xfer_osdata ( enum target_object  object,
const char *  annex,
gdb_byte *  readbuf,
const gdb_byte *  writebuf,
ULONGEST  offset,
ULONGEST  len,
ULONGEST *  xfered_len 
)
static

◆ linux_proc_pending_signals()

void linux_proc_pending_signals ( int  pid,
sigset_t *  pending,
sigset_t *  blocked,
sigset_t *  ignored 
)

Definition at line 4055 of file linux-nat.c.

References add_line_to_sigset(), and pid.

Referenced by linux_nat_has_pending_sigint().

◆ linux_proc_xfer_memory_partial()

static enum target_xfer_status linux_proc_xfer_memory_partial ( int  pid,
gdb_byte *  readbuf,
const gdb_byte *  writebuf,
ULONGEST  offset,
LONGEST  len,
ULONGEST *  xfered_len 
)
static

◆ linux_proc_xfer_memory_partial_fd()

static enum target_xfer_status linux_proc_xfer_memory_partial_fd ( int  fd,
int  pid,
gdb_byte *  readbuf,
const gdb_byte *  writebuf,
ULONGEST  offset,
LONGEST  len,
ULONGEST *  xfered_len 
)
static

◆ linux_resume_one_lwp()

static void linux_resume_one_lwp ( struct lwp_info lp,
int  step,
enum gdb_signal  signo 
)
static

◆ linux_resume_one_lwp_throw()

static void linux_resume_one_lwp_throw ( struct lwp_info lp,
int  step,
enum gdb_signal  signo 
)
static

◆ linux_stop_and_wait_all_lwps()

void linux_stop_and_wait_all_lwps ( void  )

Definition at line 2195 of file linux-nat.c.

References iterate_over_lwps(), stop_callback(), and stop_wait_callback().

Referenced by check_thread_db(), and try_thread_db_load_1().

◆ linux_stop_lwp()

void linux_stop_lwp ( struct lwp_info lwp)

◆ linux_unstop_all_lwps()

void linux_unstop_all_lwps ( void  )

Definition at line 2208 of file linux-nat.c.

References iterate_over_lwps(), and resume_stopped_resumed_lwps().

Referenced by check_thread_db(), and try_thread_db_load_1().

◆ linux_xfer_siginfo()

static enum target_xfer_status linux_xfer_siginfo ( ptid_t  ptid,
enum target_object  object,
const char *  annex,
gdb_byte *  readbuf,
const gdb_byte *  writebuf,
ULONGEST  offset,
ULONGEST  len,
ULONGEST *  xfered_len 
)
static

◆ lwp_arch_private_info()

struct arch_lwp_info * lwp_arch_private_info ( struct lwp_info lwp)

◆ lwp_info_hash()

static hashval_t lwp_info_hash ( const void *  ap)
static

Definition at line 576 of file linux-nat.c.

References pid, and lwp_info::ptid.

Referenced by lwp_lwpid_htab_create().

◆ lwp_is_stepping()

int lwp_is_stepping ( struct lwp_info lwp)

Definition at line 306 of file linux-nat.c.

References lwp_info::step.

Referenced by s390_linux_nat_target::low_prepare_to_resume().

◆ lwp_is_stopped()

int lwp_is_stopped ( struct lwp_info lwp)

◆ lwp_list_add()

static void lwp_list_add ( struct lwp_info lp)
static

Definition at line 642 of file linux-nat.c.

References lwp_list.

Referenced by add_initial_lwp().

◆ lwp_list_remove()

static void lwp_list_remove ( struct lwp_info lp)
static

Definition at line 651 of file linux-nat.c.

References lwp_list.

Referenced by delete_lwp(), and lwp_lwpid_htab_remove_pid().

◆ lwp_lwpid_htab_add_lwp()

static void lwp_lwpid_htab_add_lwp ( struct lwp_info lp)
static

Definition at line 607 of file linux-nat.c.

References lwp_lwpid_htab.

Referenced by add_initial_lwp().

◆ lwp_lwpid_htab_create()

static void lwp_lwpid_htab_create ( void  )
static

Definition at line 599 of file linux-nat.c.

References lwp_info_hash(), lwp_lwpid_htab, and lwp_lwpid_htab_eq().

◆ lwp_lwpid_htab_eq()

static int lwp_lwpid_htab_eq ( const void *  a,
const void *  b 
)
static

Definition at line 588 of file linux-nat.c.

References lwp_info::ptid.

Referenced by lwp_lwpid_htab_create().

◆ lwp_lwpid_htab_remove_pid()

static int lwp_lwpid_htab_remove_pid ( void **  slot,
void *  info 
)
static

Definition at line 731 of file linux-nat.c.

References lwp_list_remove(), lwp_lwpid_htab, pid, and lwp_info::ptid.

Referenced by purge_lwp_list().

◆ lwp_set_arch_private_info()

void lwp_set_arch_private_info ( struct lwp_info lwp,
struct arch_lwp_info info 
)

◆ lwp_status_pending_p()

static int lwp_status_pending_p ( struct lwp_info lp)
static

◆ lwp_stop_reason()

enum target_stop_reason lwp_stop_reason ( struct lwp_info lwp)

Definition at line 298 of file linux-nat.c.

References lwp_info::stop_reason.

Referenced by x86_linux_update_debug_registers().

◆ maybe_clear_ignore_sigint()

static void maybe_clear_ignore_sigint ( struct lwp_info lp)
static

◆ num_lwps()

static int num_lwps ( int  pid)
static

Definition at line 398 of file linux-nat.c.

References all_lwps(), and pid.

Referenced by check_zombie_leaders(), linux_nat_target::detach(), and linux_nat_target::pid_to_str().

◆ open_proc_mem_file()

static void open_proc_mem_file ( ptid_t  ptid)
static

◆ proc_mem_file_is_writable()

static bool proc_mem_file_is_writable ( )
static

◆ ptid_of_lwp()

ptid_t ptid_of_lwp ( struct lwp_info lwp)

◆ pull_pid_from_list()

static int pull_pid_from_list ( struct simple_pid_list **  listp,
int  pid,
int *  statusp 
)
static

Definition at line 326 of file linux-nat.c.

References simple_pid_list::next, pid, simple_pid_list::status, and xfree().

Referenced by linux_handle_extended_wait().

◆ purge_lwp_list()

static void purge_lwp_list ( int  pid)
static

◆ restore_child_signals_mask()

static void restore_child_signals_mask ( sigset_t *  prev_mask)
static

Definition at line 686 of file linux-nat.c.

Referenced by linux_nat_wait_1(), and wait_lwp().

◆ resume_clear_callback()

static int resume_clear_callback ( struct lwp_info lp)
static

Definition at line 1583 of file linux-nat.c.

References lwp_info::last_resume_kind, resume_stop, and lwp_info::resumed.

Referenced by linux_nat_wait_1().

◆ resume_lwp()

static void resume_lwp ( struct lwp_info lp,
int  step,
enum gdb_signal  signo 
)
static

◆ resume_set_callback()

static int resume_set_callback ( struct lwp_info lp)
static

Definition at line 1591 of file linux-nat.c.

References lwp_info::last_resume_kind, resume_continue, and lwp_info::resumed.

Referenced by linux_nat_target::resume().

◆ resume_stopped_resumed_lwps()

static int resume_stopped_resumed_lwps ( struct lwp_info lp,
const ptid_t  wait_ptid 
)
static

◆ resumed_callback()

static int resumed_callback ( struct lwp_info lp)
static

Definition at line 2753 of file linux-nat.c.

References lwp_info::resumed.

Referenced by linux_nat_wait_1().

◆ save_stop_reason()

static void save_stop_reason ( struct lwp_info lp)
static

◆ select_event_lwp()

static void select_event_lwp ( ptid_t  filter,
struct lwp_info **  orig_lp,
int *  status 
)
static

◆ select_event_lwp_callback()

static int select_event_lwp_callback ( struct lwp_info lp,
int *  selector 
)
static

Definition at line 2504 of file linux-nat.c.

References lwp_status_pending_p(), lwp_info::resumed, and selector.

Referenced by select_event_lwp().

◆ select_singlestep_lwp_callback()

static int select_singlestep_lwp_callback ( struct lwp_info lp)
static

Definition at line 2481 of file linux-nat.c.

References lwp_info::last_resume_kind, resume_step, and lwp_info::status.

Referenced by select_event_lwp().

◆ set_ignore_sigint()

static int set_ignore_sigint ( struct lwp_info lp)
static

Definition at line 2236 of file linux-nat.c.

References lwp_info::ignore_sigint, lwp_info::status, and lwp_info::stopped.

Referenced by linux_nat_filter_event().

◆ show_debug_linux_nat()

static void show_debug_linux_nat ( struct ui_file file,
int  from_tty,
struct cmd_list_element c,
const char *  value 
)
static

Definition at line 202 of file linux-nat.c.

References gdb_printf().

◆ sigchld_handler()

static void sigchld_handler ( int  signo)
static

◆ siginfo_fixup()

static void siginfo_fixup ( siginfo_t *  siginfo,
gdb_byte *  inf_siginfo,
int  direction 
)
static

Definition at line 3596 of file linux-nat.c.

References linux_target, and linux_nat_target::low_siginfo_fixup().

Referenced by linux_xfer_siginfo().

◆ status_callback()

static int status_callback ( struct lwp_info lp)
static

◆ stop_callback()

static int stop_callback ( struct lwp_info lp)
static

◆ stop_wait_callback()

static int stop_wait_callback ( struct lwp_info lp)
static

◆ wait_for_signal()

static void wait_for_signal ( )
static

◆ wait_lwp()

static int wait_lwp ( struct lwp_info lp)
static

Variable Documentation

◆ blocked_mask

sigset_t blocked_mask
static

Definition at line 664 of file linux-nat.c.

Referenced by block_child_signals().

◆ debug_linux_nat

bool debug_linux_nat
static

Definition at line 197 of file linux-nat.c.

Referenced by kill_one_lwp(), linux_nat_stop_lwp(), and sigchld_handler().

◆ have_ptrace_getregset

enum tribool have_ptrace_getregset = TRIBOOL_UNKNOWN

◆ lin_thread_signals

int lin_thread_signals[] = { __SIGRTMIN, __SIGRTMIN + 1 }
static

Definition at line 4508 of file linux-nat.c.

Referenced by lin_thread_get_thread_signal(), and lin_thread_get_thread_signal_num().

◆ linux_target

struct linux_nat_target* linux_target

◆ lwp_list

intrusive_list<lwp_info> lwp_list
static

Definition at line 621 of file linux-nat.c.

Referenced by all_lwps(), all_lwps_safe(), lwp_list_add(), and lwp_list_remove().

◆ lwp_lwpid_htab

htab_t lwp_lwpid_htab
static

◆ pass_mask

sigset_t pass_mask
static

◆ proc_mem_file_map

std::unordered_map<int, proc_mem_file> proc_mem_file_map
static

◆ report_thread_events

int report_thread_events
static

◆ sigchld_action

struct sigaction sigchld_action
static

Definition at line 667 of file linux-nat.c.

◆ stopped_pids

struct simple_pid_list* stopped_pids
static

Definition at line 225 of file linux-nat.c.

Referenced by linux_handle_extended_wait(), and linux_nat_filter_event().

◆ suspend_mask

sigset_t suspend_mask
static

Definition at line 661 of file linux-nat.c.

Referenced by wait_for_signal().