GDB (xrefs)
Classes | Defines | Functions | Variables
/home/stan/gdb/src/gdb/linux-nat.c File Reference
#include "defs.h"
#include "inferior.h"
#include "target.h"
#include "nat/linux-nat.h"
#include "nat/linux-waitpid.h"
#include "gdb_string.h"
#include "gdb_wait.h"
#include "gdb_assert.h"
#include <sys/ptrace.h>
#include "linux-nat.h"
#include "linux-ptrace.h"
#include "linux-procfs.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 "gdb_stat.h"
#include <fcntl.h>
#include "inf-loop.h"
#include "event-loop.h"
#include "event-top.h"
#include <pwd.h>
#include <sys/types.h>
#include "gdb_dirent.h"
#include "xml-support.h"
#include "terminal.h"
#include <sys/vfs.h>
#include "solib.h"
#include "linux-osdata.h"
#include "linux-tdep.h"
#include "symfile.h"
#include "agent.h"
#include "tracepoint.h"
#include "exceptions.h"
#include "buffer.h"
#include "target-descriptions.h"
#include "filestuff.h"

Go to the source code of this file.

Classes

struct  simple_pid_list

Defines

#define SPUFS_MAGIC   0x23c9b64e
#define O_LARGEFILE   0
#define FORMAT   "/proc/%d/task/%ld/comm"
#define COMM_LEN   16

Functions

static void show_debug_linux_nat (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void async_file_flush (void)
static void async_file_mark (void)
static void linux_nat_async (void(*callback)(enum inferior_event_type event_type, void *context), void *context)
static int kill_lwp (int lwpid, int signo)
static int stop_callback (struct lwp_info *lp, void *data)
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 void add_to_pid_list (struct simple_pid_list **listp, int pid, int status)
static int in_pid_list_p (struct simple_pid_list *list, int pid)
static int pull_pid_from_list (struct simple_pid_list **listp, int pid, int *statusp)
static void linux_init_ptrace (pid_t pid)
static void linux_child_post_attach (int pid)
static void linux_child_post_startup_inferior (ptid_t ptid)
static int num_lwps (int pid)
static void delete_lwp_cleanup (void *lp_voidp)
static int linux_child_follow_fork (struct target_ops *ops, int follow_child, int detach_fork)
static int linux_child_insert_fork_catchpoint (int pid)
static int linux_child_remove_fork_catchpoint (int pid)
static int linux_child_insert_vfork_catchpoint (int pid)
static int linux_child_remove_vfork_catchpoint (int pid)
static int linux_child_insert_exec_catchpoint (int pid)
static int linux_child_remove_exec_catchpoint (int pid)
static int linux_child_set_syscall_catchpoint (int pid, int needed, int any_count, int table_size, int *table)
static void linux_nat_pass_signals (int numsigs, unsigned char *pass_signals)
static int stop_wait_callback (struct lwp_info *lp, void *data)
static int linux_thread_alive (ptid_t ptid)
static char * linux_child_pid_to_exec_file (int pid)
static char * status_to_str (int status)
static void lwp_free (struct lwp_info *lp)
static struct lwp_infoadd_initial_lwp (ptid_t ptid)
struct lwp_infoiterate_over_lwps (ptid_t filter, int(*callback)(struct lwp_info *, void *), void *data)
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 first, int *cloned, int *signalled)
int lin_lwp_attach_lwp (ptid_t ptid)
static void linux_nat_create_inferior (struct target_ops *ops, char *exec_file, char *allargs, char **env, int from_tty)
static void linux_nat_attach (struct target_ops *ops, char *args, int from_tty)
static int get_pending_status (struct lwp_info *lp, int *status)
static int detach_callback (struct lwp_info *lp, void *data)
static void linux_nat_detach (struct target_ops *ops, char *args, int from_tty)
static void resume_lwp (struct lwp_info *lp, int step, enum gdb_signal signo)
static int linux_nat_resume_callback (struct lwp_info *lp, void *data)
static int resume_clear_callback (struct lwp_info *lp, void *data)
static int resume_set_callback (struct lwp_info *lp, void *data)
static void linux_nat_resume (struct target_ops *ops, ptid_t ptid, int step, enum gdb_signal signo)
static int linux_handle_syscall_trap (struct lwp_info *lp, int stopping)
static int linux_handle_extended_wait (struct lwp_info *lp, int status, int stopping)
static int wait_lwp (struct lwp_info *lp)
void linux_stop_lwp (struct lwp_info *lwp)
static int linux_nat_has_pending_sigint (int pid)
static int set_ignore_sigint (struct lwp_info *lp, void *data)
static void maybe_clear_ignore_sigint (struct lwp_info *lp)
static void save_sigtrap (struct lwp_info *lp)
static int linux_nat_stopped_by_watchpoint (void)
static int linux_nat_stopped_data_address (struct target_ops *ops, CORE_ADDR *addr_p)
static int sigtrap_is_event (int status)
static int linux_nat_lp_status_is_event (struct lwp_info *lp)
void linux_nat_set_status_is_event (struct target_ops *t, int(*status_is_event)(int status))
static int status_callback (struct lwp_info *lp, void *data)
static int running_callback (struct lwp_info *lp, void *data)
static int count_events_callback (struct lwp_info *lp, void *data)
static int select_singlestep_lwp_callback (struct lwp_info *lp, void *data)
static int select_event_lwp_callback (struct lwp_info *lp, void *data)
static int cancel_breakpoint (struct lwp_info *lp)
static int cancel_breakpoints_callback (struct lwp_info *lp, void *data)
static void select_event_lwp (ptid_t filter, struct lwp_info **orig_lp, int *status)
static int resumed_callback (struct lwp_info *lp, void *data)
static int stop_and_resume_callback (struct lwp_info *lp, void *data)
static struct lwp_infolinux_nat_filter_event (int lwpid, int status, int *new_pending_p)
static void check_zombie_leaders (void)
static ptid_t linux_nat_wait_1 (struct target_ops *ops, ptid_t ptid, struct target_waitstatus *ourstatus, int target_options)
static int resume_stopped_resumed_lwps (struct lwp_info *lp, void *data)
static ptid_t linux_nat_wait (struct target_ops *ops, ptid_t ptid, struct target_waitstatus *ourstatus, int target_options)
static int kill_callback (struct lwp_info *lp, void *data)
static int kill_wait_callback (struct lwp_info *lp, void *data)
static void linux_nat_kill (struct target_ops *ops)
static void linux_nat_mourn_inferior (struct target_ops *ops)
static void siginfo_fixup (siginfo_t *siginfo, gdb_byte *inf_siginfo, int direction)
static LONGEST linux_xfer_siginfo (struct target_ops *ops, enum target_object object, const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
static LONGEST linux_nat_xfer_partial (struct target_ops *ops, enum target_object object, const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
static int linux_nat_thread_alive (struct target_ops *ops, ptid_t ptid)
static char * linux_nat_pid_to_str (struct target_ops *ops, ptid_t ptid)
static char * linux_nat_thread_name (struct thread_info *thr)
static char * linux_nat_collect_thread_registers (const struct regcache *regcache, ptid_t ptid, bfd *obfd, char *note_data, int *note_size, enum gdb_signal stop_signal)
static char * linux_nat_make_corefile_notes (bfd *obfd, int *note_size)
static LONGEST linux_proc_xfer_partial (struct target_ops *ops, enum target_object object, const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
static LONGEST spu_enumerate_spu_ids (int pid, gdb_byte *buf, ULONGEST offset, LONGEST len)
static LONGEST linux_proc_xfer_spu (struct target_ops *ops, enum target_object object, const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST 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 LONGEST linux_nat_xfer_osdata (struct target_ops *ops, enum target_object object, const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
static LONGEST linux_xfer_partial (struct target_ops *ops, enum target_object object, const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
static void cleanup_target_stop (void *arg)
static VEC (static_tracepoint_marker_p)
static void linux_target_install_ops (struct target_ops *t)
struct target_opslinux_target (void)
struct target_opslinux_trad_target (CORE_ADDR(*register_u_offset)(struct gdbarch *, int, int))
static int linux_nat_is_async_p (void)
static int linux_nat_can_async_p (void)
static int linux_nat_supports_non_stop (void)
static int linux_nat_supports_multi_process (void)
static int linux_nat_supports_disable_randomization (void)
static void linux_nat_terminal_inferior (void)
static void linux_nat_terminal_ours (void)
static void sigchld_handler (int signo)
static void handle_target_event (int error, gdb_client_data client_data)
static int linux_async_pipe (int enable)
static int linux_nat_stop_lwp (struct lwp_info *lwp, void *data)
static void linux_nat_stop (ptid_t ptid)
static void linux_nat_close (void)
static struct address_spacelinux_nat_thread_address_space (struct target_ops *t, ptid_t ptid)
static int linux_nat_core_of_thread (struct target_ops *ops, ptid_t ptid)
void linux_nat_add_target (struct target_ops *t)
void linux_nat_set_new_thread (struct target_ops *t, void(*new_thread)(struct lwp_info *))
void linux_nat_set_new_fork (struct target_ops *t, linux_nat_new_fork_ftype *new_fork)
void linux_nat_set_forget_process (struct target_ops *t, linux_nat_forget_process_ftype *fn)
void linux_nat_forget_process (pid_t pid)
void linux_nat_set_siginfo_fixup (struct target_ops *t, int(*siginfo_fixup)(siginfo_t *, gdb_byte *, int))
void linux_nat_set_prepare_to_resume (struct target_ops *t, void(*prepare_to_resume)(struct lwp_info *))
int linux_nat_get_siginfo (ptid_t ptid, siginfo_t *siginfo)
void _initialize_linux_nat (void)
static int get_signo (const char *name)
void lin_thread_get_thread_signals (sigset_t *set)

Variables

static struct target_opslinux_ops
static struct target_ops linux_ops_saved
static void(* linux_nat_new_thread )(struct lwp_info *)
static linux_nat_new_fork_ftypelinux_nat_new_fork
static
linux_nat_forget_process_ftype
linux_nat_forget_process_hook
static void(* linux_nat_prepare_to_resume )(struct lwp_info *)
static int(* linux_nat_siginfo_fixup )(siginfo_t *, gdb_byte *, int)
static LONGEST(* super_xfer_partial )(struct target_ops *, enum target_object, const char *, gdb_byte *, const gdb_byte *, ULONGEST, LONGEST)
static unsigned int debug_linux_nat
struct simple_pid_liststopped_pids
static int linux_nat_event_pipe [2] = { -1, -1 }
struct lwp_infolwp_list
static sigset_t normal_mask
static sigset_t suspend_mask
static sigset_t blocked_mask
struct sigaction sigchld_action
static sigset_t pass_mask
static int(* linux_nat_status_is_event )(int status) = sigtrap_is_event
int linux_multi_process = 1
static int async_terminal_is_ours = 1
static void(* async_client_callback )(enum inferior_event_type event_type, void *context)
static void * async_client_context
initialize_file_ftype _initialize_linux_nat

Define Documentation

#define COMM_LEN   16

Referenced by linux_nat_thread_name().

#define FORMAT   "/proc/%d/task/%ld/comm"

Referenced by linux_nat_thread_name().

#define O_LARGEFILE   0

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

Referenced by linux_proc_xfer_partial().

#define SPUFS_MAGIC   0x23c9b64e

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

Referenced by spu_enumerate_spu_ids().


Function Documentation

void _initialize_linux_nat ( void  )
static struct lwp_info* add_initial_lwp ( ptid_t  ptid) [static, read]
static void add_line_to_sigset ( const char *  line,
sigset_t *  sigs 
) [static]

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

References _, error(), len, line, and p.

Referenced by linux_proc_pending_signals().

static struct lwp_info * add_lwp ( ptid_t  ptid) [static, read]
static void add_to_pid_list ( struct simple_pid_list **  listp,
int  pid,
int  status 
) [static]
static void async_file_flush ( void  ) [static]

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

References linux_nat_event_pipe, and read().

Referenced by async_file_mark(), and linux_nat_wait().

static void async_file_mark ( void  ) [static]
static void block_child_signals ( sigset_t *  prev_mask) [static]

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

Referenced by linux_async_pipe(), linux_nat_wait_1(), and wait_lwp().

static int cancel_breakpoint ( struct lwp_info lp) [static]
static int cancel_breakpoints_callback ( struct lwp_info lp,
void *  data 
) [static]

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

References cancel_breakpoint(), linux_nat_lp_status_is_event(), and lwp_info::status.

Referenced by linux_nat_wait_1().

static void check_zombie_leaders ( void  ) [static]
static void cleanup_target_stop ( void *  arg) [static]

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

References gdb_assert, and target_resume().

Referenced by VEC().

static int count_events_callback ( struct lwp_info lp,
void *  data 
) [static]

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

References gdb_assert, linux_nat_lp_status_is_event(), and lwp_info::resumed.

Referenced by select_event_lwp().

static void delete_lwp ( ptid_t  ptid) [static]

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

References lwp_free(), lwp_info::next, and ptid_equal().

Referenced by delete_lwp_cleanup(), detach_callback(), exit_lwp(), and linux_nat_detach().

static void delete_lwp_cleanup ( void *  lp_voidp) [static]

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

References delete_lwp(), and lwp_info::ptid.

Referenced by linux_child_follow_fork().

static int detach_callback ( struct lwp_info lp,
void *  data 
) [static]
static void exit_lwp ( struct lwp_info lp) [static]
static struct lwp_info * find_lwp_pid ( ptid_t  ptid) [static, read]
static int get_pending_status ( struct lwp_info lp,
int status 
) [static]
static int get_signo ( const char *  name) [static]
static void handle_target_event ( int  error,
gdb_client_data  client_data 
) [static]

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

References async_client_context, and INF_REG_EVENT.

Referenced by linux_nat_async().

static int in_pid_list_p ( struct simple_pid_list list,
int  pid 
) [static]

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

References simple_pid_list::next, p, and simple_pid_list::pid.

Referenced by lin_lwp_attach_lwp().

struct lwp_info* iterate_over_lwps ( ptid_t  filter,
int(*)(struct lwp_info *, void *)  callback,
void *  data 
) [read]
static int kill_callback ( struct lwp_info lp,
void *  data 
) [static]
static int kill_lwp ( int  lwpid,
int  signo 
) [static]
static int kill_wait_callback ( struct lwp_info lp,
void *  data 
) [static]
void lin_thread_get_thread_signals ( sigset_t *  set)

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

References get_signo(), and sigchld_handler().

Referenced by check_thread_signals().

static int linux_async_pipe ( int  enable) [static]
static int linux_child_follow_fork ( struct target_ops ops,
int  follow_child,
int  detach_fork 
) [static]
static int linux_child_insert_exec_catchpoint ( int  pid) [static]

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

References linux_supports_tracefork().

Referenced by linux_target_install_ops().

static int linux_child_insert_fork_catchpoint ( int  pid) [static]

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

References linux_supports_tracefork().

Referenced by linux_target_install_ops().

static int linux_child_insert_vfork_catchpoint ( int  pid) [static]

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

References linux_supports_tracefork().

Referenced by linux_target_install_ops().

static char * linux_child_pid_to_exec_file ( int  pid) [static]

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

References make_cleanup(), memset(), xfree(), and xmalloc().

Referenced by linux_handle_extended_wait(), and linux_target_install_ops().

static void linux_child_post_attach ( int  pid) [static]

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

References linux_init_ptrace().

Referenced by linux_target_install_ops().

static void linux_child_post_startup_inferior ( ptid_t  ptid) [static]

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

References linux_init_ptrace(), and ptid_get_pid().

Referenced by linux_target_install_ops().

static int linux_child_remove_exec_catchpoint ( int  pid) [static]

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

Referenced by linux_target_install_ops().

static int linux_child_remove_fork_catchpoint ( int  pid) [static]

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

Referenced by linux_target_install_ops().

static int linux_child_remove_vfork_catchpoint ( int  pid) [static]

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

Referenced by linux_target_install_ops().

static int linux_child_set_syscall_catchpoint ( int  pid,
int  needed,
int  any_count,
int  table_size,
int table 
) [static]

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

References linux_supports_tracesysgood().

Referenced by linux_target_install_ops().

static int linux_handle_extended_wait ( struct lwp_info lp,
int  status,
int  stopping 
) [static]
static int linux_handle_syscall_trap ( struct lwp_info lp,
int  stopping 
) [static]
static void linux_init_ptrace ( pid_t  pid) [static]
void linux_nat_add_target ( struct target_ops t)

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

References add_target(), linux_nat_async(), linux_nat_attach(), linux_nat_can_async_p(), linux_nat_close(), linux_nat_core_of_thread(), linux_nat_create_inferior(), linux_nat_detach(), linux_nat_is_async_p(), linux_nat_kill(), linux_nat_mourn_inferior(), linux_nat_pass_signals(), linux_nat_pid_to_str(), linux_nat_resume(), linux_nat_stop(), linux_nat_stopped_by_watchpoint(), linux_nat_stopped_data_address(), linux_nat_supports_disable_randomization(), linux_nat_supports_multi_process(), linux_nat_supports_non_stop(), linux_nat_terminal_inferior(), linux_nat_terminal_ours(), linux_nat_thread_address_space(), linux_nat_thread_alive(), linux_nat_thread_name(), linux_nat_wait(), linux_nat_xfer_partial(), linux_ops_saved, tc_schedlock, target_ops::to_async, target_ops::to_attach, target_ops::to_can_async_p, target_ops::to_close, target_ops::to_core_of_thread, target_ops::to_create_inferior, target_ops::to_detach, target_ops::to_has_thread_control, target_ops::to_is_async_p, target_ops::to_kill, target_ops::to_mourn_inferior, target_ops::to_pass_signals, target_ops::to_pid_to_str, target_ops::to_resume, target_ops::to_stop, target_ops::to_stopped_by_watchpoint, target_ops::to_stopped_data_address, target_ops::to_supports_disable_randomization, target_ops::to_supports_multi_process, target_ops::to_supports_non_stop, target_ops::to_terminal_inferior, target_ops::to_terminal_ours, target_ops::to_thread_address_space, target_ops::to_thread_alive, target_ops::to_thread_name, target_ops::to_wait, and target_ops::to_xfer_partial.

Referenced by _initialize_aarch64_linux_nat(), _initialize_alpha_linux_nat(), _initialize_amd64_linux_nat(), _initialize_arm_linux_nat(), _initialize_hppa_linux_nat(), _initialize_i386_linux_nat(), _initialize_ia64_linux_nat(), _initialize_m32r_linux_nat(), _initialize_m68k_linux_nat(), _initialize_mips_linux_nat(), _initialize_ppc_linux_nat(), _initialize_s390_nat(), _initialize_sparc64_linux_nat(), _initialize_sparc_linux_nat(), _initialize_tile_linux_nat(), and _initialize_xtensa_linux_nat().

static void linux_nat_async ( void(*)(enum inferior_event_type event_type, void *context)  callback,
void *  context 
) [static]
static void linux_nat_attach ( struct target_ops ops,
char *  args,
int  from_tty 
) [static]
static int linux_nat_can_async_p ( void  ) [static]

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

References target_async_permitted.

Referenced by linux_nat_add_target().

static void linux_nat_close ( void  ) [static]

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

References linux_nat_async(), linux_nat_is_async_p(), and target_ops::to_close.

Referenced by linux_nat_add_target().

static char* linux_nat_collect_thread_registers ( const struct regcache regcache,
ptid_t  ptid,
bfd *  obfd,
char *  note_data,
int note_size,
enum gdb_signal  stop_signal 
) [static]
static int linux_nat_core_of_thread ( struct target_ops ops,
ptid_t  ptid 
) [static]

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

References lwp_info::core, and find_lwp_pid().

Referenced by linux_nat_add_target().

static void linux_nat_create_inferior ( struct target_ops ops,
char *  exec_file,
char *  allargs,
char **  env,
int  from_tty 
) [static]
static void linux_nat_detach ( struct target_ops ops,
char *  args,
int  from_tty 
) [static]
static struct lwp_info* linux_nat_filter_event ( int  lwpid,
int  status,
int new_pending_p 
) [static, read]
void linux_nat_forget_process ( pid_t  pid)

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

References linux_nat_forget_process_hook.

Referenced by delete_fork(), linux_nat_kill(), and linux_nat_mourn_inferior().

int linux_nat_get_siginfo ( ptid_t  ptid,
siginfo_t *  siginfo 
)
static int linux_nat_has_pending_sigint ( int  pid) [static]

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

References linux_proc_pending_signals().

Referenced by maybe_clear_ignore_sigint().

static int linux_nat_is_async_p ( void  ) [static]

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

References target_async_permitted.

Referenced by linux_nat_add_target(), and linux_nat_close().

static void linux_nat_kill ( struct target_ops ops) [static]
static int linux_nat_lp_status_is_event ( struct lwp_info lp) [static]
static char* linux_nat_make_corefile_notes ( bfd *  obfd,
int note_size 
) [static]
static void linux_nat_mourn_inferior ( struct target_ops ops) [static]
static void linux_nat_pass_signals ( int  numsigs,
unsigned char *  pass_signals 
) [static]
static char* linux_nat_pid_to_str ( struct target_ops ops,
ptid_t  ptid 
) [static]

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

References normal_pid_to_str(), num_lwps(), ptid_get_lwp(), ptid_get_pid(), and ptid_lwp_p().

Referenced by linux_nat_add_target().

static int linux_nat_post_attach_wait ( ptid_t  ptid,
int  first,
int cloned,
int signalled 
) [static]
static void linux_nat_resume ( struct target_ops ops,
ptid_t  ptid,
int  step,
enum gdb_signal  signo 
) [static]
static int linux_nat_resume_callback ( struct lwp_info lp,
void *  data 
) [static]
void linux_nat_set_new_fork ( struct target_ops t,
linux_nat_new_fork_ftype new_fork 
)
void linux_nat_set_new_thread ( struct target_ops t,
void(*)(struct lwp_info *)  new_thread 
)
void linux_nat_set_prepare_to_resume ( struct target_ops t,
void(*)(struct lwp_info *)  prepare_to_resume 
)
void linux_nat_set_siginfo_fixup ( struct target_ops t,
int(*)(siginfo_t *, gdb_byte *, int siginfo_fixup 
)

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

References linux_nat_siginfo_fixup, and siginfo_fixup().

Referenced by _initialize_amd64_linux_nat().

void linux_nat_set_status_is_event ( struct target_ops t,
int(*)(int status)  status_is_event 
)

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

References linux_nat_status_is_event.

Referenced by _initialize_ia64_linux_nat().

static void linux_nat_stop ( ptid_t  ptid) [static]

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

References iterate_over_lwps(), linux_nat_stop_lwp(), non_stop, and target_ops::to_stop.

Referenced by linux_nat_add_target().

static int linux_nat_stop_lwp ( struct lwp_info lwp,
void *  data 
) [static]
static int linux_nat_stopped_by_watchpoint ( void  ) [static]

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

References find_lwp_pid(), gdb_assert, inferior_ptid, and lwp_info::stopped_by_watchpoint.

Referenced by linux_nat_add_target().

static int linux_nat_stopped_data_address ( struct target_ops ops,
CORE_ADDR addr_p 
) [static]
static int linux_nat_supports_disable_randomization ( void  ) [static]

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

Referenced by linux_nat_add_target().

static int linux_nat_supports_multi_process ( void  ) [static]

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

References linux_multi_process.

Referenced by linux_nat_add_target().

static int linux_nat_supports_non_stop ( void  ) [static]

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

Referenced by linux_nat_add_target().

void linux_nat_switch_fork ( ptid_t  new_ptid)
static void linux_nat_terminal_inferior ( void  ) [static]
static void linux_nat_terminal_ours ( void  ) [static]
static struct address_space* linux_nat_thread_address_space ( struct target_ops t,
ptid_t  ptid 
) [static, read]
static int linux_nat_thread_alive ( struct target_ops ops,
ptid_t  ptid 
) [static]

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

References linux_thread_alive().

Referenced by linux_nat_add_target().

static char* linux_nat_thread_name ( struct thread_info thr) [static]
static ptid_t linux_nat_wait ( struct target_ops ops,
ptid_t  ptid,
struct target_waitstatus ourstatus,
int  target_options 
) [static]
static ptid_t linux_nat_wait_1 ( struct target_ops ops,
ptid_t  ptid,
struct target_waitstatus ourstatus,
int  target_options 
) [static]

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

References add_initial_lwp(), block_child_signals(), cancel_breakpoint(), cancel_breakpoints_callback(), check_zombie_leaders(), clear_sigint_trap(), lwp_info::core, debug_linux_nat, find_lwp_pid(), fprintf_unfiltered(), gdb_assert, gdb_signal_from_host(), gdb_signal_to_host(), gdb_stdlog, lwp_info::ignore_sigint, inferior_ptid, iterate_over_lwps(), target_waitstatus::kind, lwp_info::last_resume_kind, linux_common_core_of_thread(), linux_nat_filter_event(), linux_nat_lp_status_is_event(), linux_nat_prepare_to_resume, linux_nat_status_is_event, maybe_clear_ignore_sigint(), minus_one_ptid, my_waitpid(), non_stop, pid_to_ptid(), lwp_info::ptid, ptid_build(), ptid_equal(), ptid_get_lwp(), ptid_get_pid(), ptid_is_pid(), ptid_lwp_p(), ptid_match(), registers_changed(), restore_child_signals_mask(), resume_clear_callback(), resume_stop, lwp_info::resumed, resumed_callback(), safe_strerror(), select_event_lwp(), set_ignore_sigint(), set_sigint_trap(), target_waitstatus::sig, signal_pass_state(), lwp_info::signalled, lwp_info::status, exsummary::status, status_callback(), status_to_str(), lwp_info::step, stop_callback(), stop_wait_callback(), lwp_info::stopped, store_waitstatus(), target_can_async_p, target_pid_to_str(), TARGET_WAITKIND_EXITED, TARGET_WAITKIND_IGNORE, TARGET_WAITKIND_NO_RESUMED, TARGET_WAITKIND_SIGNALLED, TARGET_WAITKIND_STOPPED, TARGET_WNOHANG, thread_change_ptid(), target_ops::to_resume, target_waitstatus::value, and lwp_info::waitstatus.

Referenced by linux_nat_wait().

static LONGEST linux_nat_xfer_osdata ( struct target_ops ops,
enum target_object  object,
const char *  annex,
gdb_byte readbuf,
const gdb_byte writebuf,
ULONGEST  offset,
LONGEST  len 
) [static]

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

References gdb_assert, linux_common_xfer_osdata(), and TARGET_OBJECT_OSDATA.

Referenced by linux_xfer_partial().

static LONGEST linux_nat_xfer_partial ( struct target_ops ops,
enum target_object  object,
const char *  annex,
gdb_byte readbuf,
const gdb_byte writebuf,
ULONGEST  offset,
LONGEST  len 
) [static]
void linux_proc_pending_signals ( int  pid,
sigset_t *  pending,
sigset_t *  blocked,
sigset_t *  ignored 
)
static LONGEST linux_proc_xfer_partial ( struct target_ops ops,
enum target_object  object,
const char *  annex,
gdb_byte readbuf,
const gdb_byte writebuf,
ULONGEST  offset,
LONGEST  len 
) [static]
static LONGEST linux_proc_xfer_spu ( struct target_ops ops,
enum target_object  object,
const char *  annex,
gdb_byte readbuf,
const gdb_byte writebuf,
ULONGEST  offset,
LONGEST  len 
) [static]
void linux_stop_lwp ( struct lwp_info lwp)

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

References stop_callback().

Referenced by debug_reg_change_callback(), and update_debug_registers_callback().

struct target_ops* linux_target ( void  ) [read]
static void linux_target_install_ops ( struct target_ops t) [static]
static int linux_thread_alive ( ptid_t  ptid) [static]
struct target_ops* linux_trad_target ( CORE_ADDR(*)(struct gdbarch *, int, int register_u_offset) [read]
static LONGEST linux_xfer_partial ( struct target_ops ops,
enum target_object  object,
const char *  annex,
gdb_byte readbuf,
const gdb_byte writebuf,
ULONGEST  offset,
LONGEST  len 
) [static]
static LONGEST linux_xfer_siginfo ( struct target_ops ops,
enum target_object  object,
const char *  annex,
gdb_byte readbuf,
const gdb_byte writebuf,
ULONGEST  offset,
LONGEST  len 
) [static]
static void lwp_free ( struct lwp_info lp) [static]

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

References lwp_info::arch_private, and xfree().

Referenced by delete_lwp(), and purge_lwp_list().

static void maybe_clear_ignore_sigint ( struct lwp_info lp) [static]
static int num_lwps ( int  pid) [static]
static int pull_pid_from_list ( struct simple_pid_list **  listp,
int  pid,
int statusp 
) [static]

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

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

Referenced by linux_handle_extended_wait().

static void purge_lwp_list ( int  pid) [static]
static void restore_child_signals_mask ( sigset_t *  prev_mask) [static]

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

Referenced by linux_async_pipe(), linux_nat_wait_1(), and wait_lwp().

static int resume_clear_callback ( struct lwp_info lp,
void *  data 
) [static]

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

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

Referenced by linux_nat_wait_1().

static void resume_lwp ( struct lwp_info lp,
int  step,
enum gdb_signal  signo 
) [static]
static int resume_set_callback ( struct lwp_info lp,
void *  data 
) [static]

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

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

Referenced by linux_nat_resume().

static int resume_stopped_resumed_lwps ( struct lwp_info lp,
void *  data 
) [static]
static int resumed_callback ( struct lwp_info lp,
void *  data 
) [static]

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

References lwp_info::resumed.

Referenced by linux_nat_wait_1().

static int running_callback ( struct lwp_info lp,
void *  data 
) [static]
static void save_sigtrap ( struct lwp_info lp) [static]
static void select_event_lwp ( ptid_t  filter,
struct lwp_info **  orig_lp,
int status 
) [static]
static int select_event_lwp_callback ( struct lwp_info lp,
void *  data 
) [static]

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

References gdb_assert, linux_nat_lp_status_is_event(), lwp_info::resumed, and selector.

Referenced by select_event_lwp().

static int select_singlestep_lwp_callback ( struct lwp_info lp,
void *  data 
) [static]

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

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

Referenced by select_event_lwp().

static int set_ignore_sigint ( struct lwp_info lp,
void *  data 
) [static]

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

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

Referenced by linux_nat_wait_1().

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 211 of file linux-nat.c.

References _, and fprintf_filtered().

Referenced by _initialize_linux_nat().

static void sigchld_handler ( int  signo) [static]
static void siginfo_fixup ( siginfo_t *  siginfo,
gdb_byte inf_siginfo,
int  direction 
) [static]

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

References linux_nat_siginfo_fixup, and memcpy().

Referenced by linux_nat_set_siginfo_fixup(), and linux_xfer_siginfo().

static int sigtrap_is_event ( int  status) [static]

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

static LONGEST spu_enumerate_spu_ids ( int  pid,
gdb_byte buf,
ULONGEST  offset,
LONGEST  len 
) [static]
static int status_callback ( struct lwp_info lp,
void *  data 
) [static]
static char* status_to_str ( int  status) [static]
static int stop_and_resume_callback ( struct lwp_info lp,
void *  data 
) [static]
static int stop_callback ( struct lwp_info lp,
void *  data 
) [static]
static int stop_wait_callback ( struct lwp_info lp,
void *  data 
) [static]
static VEC ( static_tracepoint_marker_p  ) [static]
static int wait_lwp ( struct lwp_info lp) [static]

Variable Documentation

Referenced by initialize_all_files().

void(* async_client_callback)(enum inferior_event_type event_type, void *context) [static]

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

Referenced by linux_nat_async().

void* async_client_context [static]

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

Referenced by handle_target_event().

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

sigset_t blocked_mask [static]

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

unsigned int debug_linux_nat [static]

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

Referenced by linux_nat_supports_multi_process().

int linux_nat_event_pipe[2] = { -1, -1 } [static]

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

Referenced by linux_nat_forget_process(), and linux_nat_set_forget_process().

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

Referenced by linux_handle_extended_wait(), and linux_nat_set_new_fork().

void(* linux_nat_new_thread)(struct lwp_info *) [static]

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

Referenced by add_lwp(), and linux_nat_set_new_thread().

void(* linux_nat_prepare_to_resume)(struct lwp_info *) [static]
int(* linux_nat_siginfo_fixup)(siginfo_t *, gdb_byte *, int) [static]

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

Referenced by linux_nat_set_siginfo_fixup(), and siginfo_fixup().

struct target_ops* linux_ops [static]

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

struct target_ops linux_ops_saved [static]

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

Referenced by linux_nat_add_target().

struct lwp_info* lwp_list

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

Referenced by add_initial_lwp(), and num_lwps().

sigset_t normal_mask [static]

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

sigset_t pass_mask [static]

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

struct sigaction sigchld_action

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

Referenced by _initialize_linux_nat().

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

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

Referenced by linux_target_install_ops(), and linux_xfer_partial().

sigset_t suspend_mask [static]

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

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines