GDB (xrefs)
|
#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.
#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().
void _initialize_linux_nat | ( | void | ) |
Definition at line 4956 of file linux-nat.c.
References _, add_setshow_zuinteger_cmd(), class_maintenance, debug_linux_nat, setdebuglist, show_debug_linux_nat(), showdebuglist, sigchld_action, and sigchld_handler().
static struct lwp_info* add_initial_lwp | ( | ptid_t | ptid | ) | [static, read] |
Definition at line 935 of file linux-nat.c.
References lwp_info::core, gdb_assert, target_waitstatus::kind, lwp_info::last_resume_kind, lwp_list, memset(), lwp_info::next, lwp_info::ptid, ptid_lwp_p(), resume_continue, TARGET_WAITKIND_IGNORE, lwp_info::waitstatus, and xmalloc().
Referenced by add_lwp(), linux_nat_attach(), and linux_nat_wait_1().
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().
Definition at line 962 of file linux-nat.c.
References add_initial_lwp(), and linux_nat_new_thread.
Referenced by lin_lwp_attach_lwp(), linux_child_follow_fork(), linux_handle_extended_wait(), linux_nat_filter_event(), and linux_nat_switch_fork().
static void add_to_pid_list | ( | struct simple_pid_list ** | listp, |
int | pid, | ||
int | status | ||
) | [static] |
Definition at line 292 of file linux-nat.c.
References simple_pid_list::next, simple_pid_list::pid, exsummary::status, simple_pid_list::status, and xmalloc().
Referenced by lin_lwp_attach_lwp(), and linux_nat_filter_event().
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] |
Definition at line 252 of file linux-nat.c.
References async_file_flush(), and linux_nat_event_pipe.
Referenced by linux_child_follow_fork(), linux_nat_async(), linux_nat_resume(), linux_nat_wait(), and sigchld_handler().
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] |
Definition at line 2727 of file linux-nat.c.
References breakpoint_inserted_here_p(), debug_linux_nat, fprintf_unfiltered(), gdb_stdlog, gdbarch_decr_pc_after_break(), get_regcache_arch(), get_regcache_aspace(), get_thread_regcache(), lwp_info::ptid, regcache_read_pc(), regcache_write_pc(), and target_pid_to_str().
Referenced by cancel_breakpoints_callback(), and linux_nat_wait_1().
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] |
Definition at line 3126 of file linux-nat.c.
References ALL_INFERIORS, debug_linux_nat, exit_lwp(), find_lwp_pid(), fprintf_unfiltered(), gdb_stdlog, arm-linux::inf, linux_proc_pid_is_zombie(), num_lwps(), inferior::pid, and pid_to_ptid().
Referenced by linux_nat_wait_1().
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] |
Definition at line 1509 of file linux-nat.c.
References _, debug_linux_nat, delete_lwp(), error(), fprintf_unfiltered(), gdb_assert, gdb_stdlog, get_pending_status(), kill_lwp(), linux_nat_prepare_to_resume, lwp_info::ptid, ptid_get_lwp(), ptid_get_pid(), ptrace(), safe_strerror(), lwp_info::signalled, lwp_info::status, exsummary::status, and target_pid_to_str().
Referenced by linux_nat_detach().
Definition at line 1078 of file linux-nat.c.
References _, delete_lwp(), delete_thread(), find_thread_ptid(), print_thread_events, printf_unfiltered(), lwp_info::ptid, and target_pid_to_str().
Referenced by check_zombie_leaders(), linux_nat_filter_event(), and wait_lwp().
static struct lwp_info * find_lwp_pid | ( | ptid_t | ptid | ) | [static, read] |
Definition at line 1006 of file linux-nat.c.
References lwp_info::next, lwp_info::ptid, ptid_get_lwp(), ptid_get_pid(), and ptid_lwp_p().
Referenced by check_zombie_leaders(), lin_lwp_attach_lwp(), linux_child_follow_fork(), linux_nat_core_of_thread(), linux_nat_detach(), linux_nat_filter_event(), linux_nat_resume(), linux_nat_stopped_by_watchpoint(), linux_nat_stopped_data_address(), linux_nat_thread_address_space(), linux_nat_wait_1(), and stop_and_resume_callback().
static int get_pending_status | ( | struct lwp_info * | lp, |
int * | status | ||
) | [static] |
Definition at line 1426 of file linux-nat.c.
References debug_linux_nat, find_thread_ptid(), fprintf_unfiltered(), gdb_signal_from_host(), gdb_signal_to_host(), gdb_signal_to_string(), gdb_stdlog, get_last_target_status(), is_executing(), target_waitstatus::kind, non_stop, lwp_info::ptid, ptid_get_lwp(), signal_pass_state(), lwp_info::status, thread_suspend_state::stop_signal, thread_info::suspend, target_pid_to_str(), TARGET_WAITKIND_IGNORE, and lwp_info::waitstatus.
Referenced by detach_callback(), and linux_nat_detach().
Definition at line 4995 of file linux-nat.c.
References lookup_minimal_symbol(), SYMBOL_VALUE_ADDRESS, and target_read_memory().
Referenced by lin_thread_get_thread_signals().
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] |
Definition at line 1029 of file linux-nat.c.
References lwp_info::next, lwp_info::ptid, and ptid_match().
Referenced by aarch64_notify_debug_reg_change(), amd64_linux_dr_set_addr(), amd64_linux_dr_set_control(), i386_linux_dr_set_addr(), i386_linux_dr_set_control(), linux_nat_detach(), linux_nat_filter_event(), linux_nat_kill(), linux_nat_resume(), linux_nat_stop(), linux_nat_wait(), linux_nat_wait_1(), select_event_lwp(), and thread_db_find_new_threads().
static int kill_callback | ( | struct lwp_info * | lp, |
void * | data | ||
) | [static] |
Definition at line 3699 of file linux-nat.c.
References debug_linux_nat, fprintf_unfiltered(), gdb_stdlog, lwp_info::ptid, ptid_get_lwp(), ptrace(), safe_strerror(), and target_pid_to_str().
Referenced by kill_wait_callback(), and linux_nat_kill().
Definition at line 1823 of file linux-nat.c.
Referenced by detach_callback(), linux_nat_post_attach_wait(), linux_thread_alive(), and stop_callback().
static int kill_wait_callback | ( | struct lwp_info * | lp, |
void * | data | ||
) | [static] |
Definition at line 3725 of file linux-nat.c.
References lwp_info::cloned, debug_linux_nat, fprintf_unfiltered(), gdb_assert, gdb_stdlog, kill_callback(), my_waitpid(), lwp_info::ptid, ptid_get_lwp(), and target_pid_to_str().
Referenced by linux_nat_kill().
int lin_lwp_attach_lwp | ( | ptid_t | ptid | ) |
Definition at line 1173 of file linux-nat.c.
References _, add_lwp(), add_to_pid_list(), lwp_info::cloned, debug_linux_nat, find_lwp_pid(), fprintf_unfiltered(), gdb_assert, gdb_stdlog, in_pid_list_p(), lwp_info::last_resume_kind, linux_nat_post_attach_wait(), linux_supports_tracefork(), my_waitpid(), lwp_info::ptid, ptid_get_lwp(), ptid_get_pid(), ptid_lwp_p(), ptrace(), resume_stop, lwp_info::resumed, safe_strerror(), lwp_info::signalled, lwp_info::status, exsummary::status, status_to_str(), lwp_info::stopped, target_pid_to_str(), target_post_attach, and warning().
Referenced by attach_thread().
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] |
Definition at line 4637 of file linux-nat.c.
References block_child_signals(), gdb_pipe_cloexec(), internal_error(), linux_nat_event_pipe, and restore_child_signals_mask().
Referenced by linux_nat_async().
static int linux_child_follow_fork | ( | struct target_ops * | ops, |
int | follow_child, | ||
int | detach_fork | ||
) | [static] |
Definition at line 379 of file linux-nat.c.
References _, add_inferior(), add_lwp(), add_program_space(), add_thread(), program_space::aspace, inferior::aspace, async_file_mark(), inferior::attach_flag, program_space::breakpoints_not_allowed, check_for_thread_db(), clone_program_space(), copy_inferior_target_desc_info(), copy_terminal_info(), current_inferior(), debug_linux_nat, delete_lwp_cleanup(), detach_fork, do_cleanups(), find_lwp_pid(), fprintf_filtered(), fprintf_unfiltered(), gdb_assert, gdb_stderr, gdb_stdlog, inferior::gdbarch, inferior_ptid, inferior_thread(), info_verbose, target_waitstatus::kind, lwp_info::last_resume_kind, linux_nat_prepare_to_resume, linux_supports_tracefork(), linux_supports_tracevforkdone(), make_cleanup(), new_address_space(), non_stop, inferior::pending_detach, thread_info::pending_follow, pid_to_ptid(), inferior::pspace, ptid_build(), ptid_get_lwp(), ptid_get_pid(), ptrace(), inferior::removable, remove_breakpoints_pid(), resume_stop, save_current_program_space(), save_inferior_ptid(), sched_multi, set_current_program_space(), solib_create_inferior_hook(), lwp_info::status, lwp_info::stopped, inferior::symfile_flags, SYMFILE_NO_READ, sync_execution, target_can_async_p, target_detach(), target_is_async_p, target_terminal_ours, TARGET_WAITKIND_VFORK_DONE, TARGET_WAITKIND_VFORKED, inferior::vfork_child, inferior::vfork_parent, inferior::waiting_for_vfork_done, and lwp_info::waitstatus.
Referenced by linux_target_install_ops().
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] |
Definition at line 1986 of file linux-nat.c.
References _, add_fork(), add_lwp(), add_thread(), lwp_info::cloned, current_inferior(), debug_linux_nat, detach_breakpoints(), target_waitstatus::execd_pathname, find_fork_pid(), find_thread_ptid(), fprintf_unfiltered(), gdb_assert, gdb_stdlog, internal_error(), target_waitstatus::kind, lwp_info::last_resume_kind, linux_child_pid_to_exec_file(), linux_fork_checkpointing_p(), linux_nat_new_fork, linux_nat_prepare_to_resume, my_waitpid(), non_stop, perror_with_name(), pid_to_ptid(), lwp_info::ptid, ptid_build(), ptid_get_lwp(), ptid_get_pid(), ptrace(), pull_pid_from_list(), target_waitstatus::related_pid, resume_continue, resume_stop, lwp_info::resumed, set_executing(), set_running(), lwp_info::signalled, lwp_info::status, exsummary::status, status_to_str(), thread_info::stop_requested, lwp_info::stopped, target_post_attach, TARGET_WAITKIND_EXECD, TARGET_WAITKIND_FORKED, TARGET_WAITKIND_IGNORE, TARGET_WAITKIND_SPURIOUS, TARGET_WAITKIND_VFORK_DONE, TARGET_WAITKIND_VFORKED, thread_db_attach_lwp(), target_ops::to_resume, target_waitstatus::value, and lwp_info::waitstatus.
Referenced by linux_nat_filter_event(), and wait_lwp().
static int linux_handle_syscall_trap | ( | struct lwp_info * | lp, |
int | stopping | ||
) | [static] |
Definition at line 1855 of file linux-nat.c.
References catch_syscall_enabled(), catching_syscall_number(), debug_linux_nat, fprintf_unfiltered(), gdb_stdlog, gdbarch_get_syscall_number(), int, target_waitstatus::kind, linux_nat_prepare_to_resume, pid_to_ptid(), lwp_info::ptid, ptid_get_lwp(), ptrace(), registers_changed(), lwp_info::step, target_waitstatus::syscall_number, lwp_info::syscall_state, target_thread_architecture, TARGET_WAITKIND_IGNORE, TARGET_WAITKIND_SYSCALL_ENTRY, TARGET_WAITKIND_SYSCALL_RETURN, target_ops::to_resume, target_waitstatus::value, and lwp_info::waitstatus.
Referenced by linux_nat_filter_event(), and wait_lwp().
static void linux_init_ptrace | ( | pid_t | pid | ) | [static] |
Definition at line 335 of file linux-nat.c.
References linux_enable_event_reporting(), and linux_ptrace_init_warnings().
Referenced by linux_child_post_attach(), and linux_child_post_startup_inferior().
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] |
Definition at line 4675 of file linux-nat.c.
References add_file_handler(), async_client_callback, async_file_mark(), delete_file_handler(), handle_target_event(), linux_async_pipe(), and linux_nat_event_pipe.
Referenced by linux_nat_add_target(), and linux_nat_close().
static void linux_nat_attach | ( | struct target_ops * | ops, |
char * | args, | ||
int | from_tty | ||
) | [static] |
Definition at line 1331 of file linux-nat.c.
References _, add_initial_lwp(), buffer_finish(), buffer_grow_str0, buffer_init(), lwp_info::cloned, debug_linux_nat, gdb_exception::error, error(), fprintf_unfiltered(), gdb_signal_from_host(), gdb_signal_to_name(), gdb_signal_to_string(), gdb_stdlog, inferior_event_handler(), inferior_ptid, internal_error(), linux_nat_pass_signals(), linux_nat_post_attach_wait(), linux_ptrace_attach_warnings(), make_cleanup(), gdb_exception::message, parse_pid_to_attach(), lwp_info::ptid, ptid_build(), ptid_get_lwp(), ptid_get_pid(), gdb_exception::reason, lwp_info::resumed, RETURN_MASK_ERROR, lwp_info::signalled, lwp_info::status, exsummary::status, status_to_str(), lwp_info::stopped, target_async, target_can_async_p, target_mourn_inferior(), target_terminal_ours, thread_change_ptid(), throw_error(), target_ops::to_attach, TRY_CATCH, and xfree().
Referenced by linux_nat_add_target().
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] |
Definition at line 4060 of file linux-nat.c.
References regset::collect_regset, fill_fpregset(), fill_gregset(), gdb_signal_to_host(), gdbarch_regset_from_core_section(), gdbarch_regset_from_core_section_p(), get_regcache_arch(), and ptid_get_lwp().
Referenced by linux_nat_make_corefile_notes().
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] |
Definition at line 1285 of file linux-nat.c.
References _, disable_randomization, linux_nat_pass_signals(), safe_strerror(), target_ops::to_create_inferior, and warning().
Referenced by linux_nat_add_target().
static void linux_nat_detach | ( | struct target_ops * | ops, |
char * | args, | ||
int | from_tty | ||
) | [static] |
Definition at line 1560 of file linux-nat.c.
References debug_linux_nat, delete_lwp(), detach_callback(), find_lwp_pid(), forks_exist_p(), fprintf_unfiltered(), gdb_assert, gdb_stdlog, get_pending_status(), inferior_ptid, iterate_over_lwps(), linux_fork_detach(), linux_nat_prepare_to_resume, num_lwps(), pid_to_ptid(), lwp_info::ptid, ptid_get_pid(), exsummary::status, stop_callback(), stop_wait_callback(), target_pid_to_str(), and target_ops::to_detach.
Referenced by linux_nat_add_target().
static struct lwp_info* linux_nat_filter_event | ( | int | lwpid, |
int | status, | ||
int * | new_pending_p | ||
) | [static, read] |
Definition at line 2913 of file linux-nat.c.
References add_lwp(), add_thread(), add_to_pid_list(), debug_linux_nat, exit_lwp(), find_lwp_pid(), fprintf_unfiltered(), gdb_assert, gdb_stdlog, lwp_info::ignore_sigint, iterate_over_lwps(), lwp_info::last_resume_kind, linux_handle_extended_wait(), linux_handle_syscall_trap(), linux_nat_prepare_to_resume, linux_nat_status_is_event, linux_thread_alive(), num_lwps(), pid_to_ptid(), lwp_info::ptid, ptid_build(), ptid_get_lwp(), ptid_get_pid(), registers_changed(), resume_stop, lwp_info::resumed, running_callback(), save_sigtrap(), lwp_info::signalled, lwp_info::status, exsummary::status, lwp_info::step, stop_and_resume_callback(), lwp_info::stopped, SYSCALL_SIGTRAP, target_pid_to_str(), and target_ops::to_resume.
Referenced by linux_nat_wait_1().
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 | ||
) |
Definition at line 4934 of file linux-nat.c.
References memset(), ptid_get_lwp(), ptid_get_pid(), ptrace(), PTRACE_GETSIGINFO, and PTRACE_TYPE_ARG3.
Referenced by aarch64_linux_stopped_data_address(), arm_linux_stopped_data_address(), ia64_linux_stopped_data_address(), and ppc_linux_stopped_data_address().
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] |
Definition at line 3780 of file linux-nat.c.
References forks_exist_p(), get_last_target_status(), inferior_ptid, iterate_over_lwps(), kill_callback(), kill_wait_callback(), target_waitstatus::kind, linux_fork_killall(), linux_nat_forget_process(), pid_to_ptid(), PT_KILL, ptid_get_pid(), ptrace(), target_waitstatus::related_pid, exsummary::status, stop_callback(), stop_wait_callback(), target_mourn_inferior(), TARGET_WAITKIND_FORKED, TARGET_WAITKIND_VFORKED, and target_waitstatus::value.
Referenced by linux_nat_add_target().
static int linux_nat_lp_status_is_event | ( | struct lwp_info * | lp | ) | [static] |
Definition at line 2544 of file linux-nat.c.
References target_waitstatus::kind, linux_nat_status_is_event, lwp_info::status, TARGET_WAITKIND_IGNORE, and lwp_info::waitstatus.
Referenced by cancel_breakpoints_callback(), count_events_callback(), linux_nat_wait_1(), and select_event_lwp_callback().
static char* linux_nat_make_corefile_notes | ( | bfd * | obfd, |
int * | note_size | ||
) | [static] |
Definition at line 4103 of file linux-nat.c.
References linux_make_corefile_notes(), linux_nat_collect_thread_registers(), and target_gdbarch().
Referenced by linux_target_install_ops().
static void linux_nat_mourn_inferior | ( | struct target_ops * | ops | ) | [static] |
Definition at line 3827 of file linux-nat.c.
References forks_exist_p(), inferior_ptid, linux_fork_mourn_inferior(), linux_nat_forget_process(), ptid_get_pid(), purge_lwp_list(), and target_ops::to_mourn_inferior.
Referenced by linux_nat_add_target().
static void linux_nat_pass_signals | ( | int | numsigs, |
unsigned char * | pass_signals | ||
) | [static] |
Definition at line 836 of file linux-nat.c.
References gdb_signal_from_host().
Referenced by linux_nat_add_target(), linux_nat_attach(), and linux_nat_create_inferior().
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] |
Definition at line 1097 of file linux-nat.c.
References _, debug_linux_nat, fprintf_unfiltered(), gdb_assert, gdb_stdlog, kill_lwp(), linux_proc_pid_is_stopped(), my_waitpid(), ptid_get_lwp(), ptrace(), exsummary::status, status_to_str(), target_pid_to_str(), and warning().
Referenced by lin_lwp_attach_lwp(), and linux_nat_attach().
static void linux_nat_resume | ( | struct target_ops * | ops, |
ptid_t | ptid, | ||
int | step, | ||
enum gdb_signal | signo | ||
) | [static] |
Definition at line 1712 of file linux-nat.c.
References async_file_mark(), debug_linux_nat, find_lwp_pid(), fprintf_unfiltered(), gdb_assert, gdb_signal_from_host(), gdb_signal_to_host(), gdb_stdlog, inferior_event_handler(), inferior_ptid, iterate_over_lwps(), target_waitstatus::kind, lwp_info::last_resume_kind, linux_nat_prepare_to_resume, linux_nat_resume_callback(), minus_one_ptid, pid_to_ptid(), lwp_info::ptid, ptid_equal(), ptid_get_lwp(), ptid_is_pid(), resume_continue, resume_set_callback(), resume_step, lwp_info::status, lwp_info::step, lwp_info::stopped, lwp_info::stopped_by_watchpoint, target_async, target_can_async_p, target_pid_to_str(), TARGET_WAITKIND_IGNORE, target_ops::to_resume, and lwp_info::waitstatus.
Referenced by linux_nat_add_target().
static int linux_nat_resume_callback | ( | struct lwp_info * | lp, |
void * | data | ||
) | [static] |
Definition at line 1674 of file linux-nat.c.
References find_thread_ptid(), lwp_info::ptid, resume_lwp(), signal_pass_state(), thread_suspend_state::stop_signal, lwp_info::stopped, and thread_info::suspend.
Referenced by linux_nat_resume().
void linux_nat_set_forget_process | ( | struct target_ops * | t, |
linux_nat_forget_process_ftype * | fn | ||
) |
Definition at line 4892 of file linux-nat.c.
References linux_nat_forget_process_hook.
Referenced by _initialize_aarch64_linux_nat(), _initialize_amd64_linux_nat(), and _initialize_i386_linux_nat().
void linux_nat_set_new_fork | ( | struct target_ops * | t, |
linux_nat_new_fork_ftype * | new_fork | ||
) |
Definition at line 4882 of file linux-nat.c.
References linux_nat_new_fork.
Referenced by _initialize_aarch64_linux_nat(), _initialize_amd64_linux_nat(), and _initialize_i386_linux_nat().
void linux_nat_set_new_thread | ( | struct target_ops * | t, |
void(*)(struct lwp_info *) | new_thread | ||
) |
Definition at line 4870 of file linux-nat.c.
References linux_nat_new_thread, and new_thread().
Referenced by _initialize_aarch64_linux_nat(), _initialize_amd64_linux_nat(), _initialize_arm_linux_nat(), _initialize_i386_linux_nat(), _initialize_ia64_linux_nat(), _initialize_mips_linux_nat(), _initialize_ppc_linux_nat(), and _initialize_s390_nat().
void linux_nat_set_prepare_to_resume | ( | struct target_ops * | t, |
void(*)(struct lwp_info *) | prepare_to_resume | ||
) |
Definition at line 4924 of file linux-nat.c.
References linux_nat_prepare_to_resume.
Referenced by _initialize_aarch64_linux_nat(), _initialize_amd64_linux_nat(), and _initialize_i386_linux_nat().
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] |
Definition at line 4705 of file linux-nat.c.
References debug_linux_nat, find_thread_ptid(), fprintf_unfiltered(), gdb_stdlog, lwp_info::last_resume_kind, lwp_info::ptid, ptid_get_lwp(), resume_stop, stop_callback(), thread_info::stop_requested, lwp_info::stopped, and target_pid_to_str().
Referenced by linux_nat_stop().
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] |
Definition at line 2518 of file linux-nat.c.
References find_lwp_pid(), gdb_assert, inferior_ptid, lwp_info::stopped_data_address, and lwp_info::stopped_data_address_p.
Referenced by linux_nat_add_target().
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 | ) |
Definition at line 1055 of file linux-nat.c.
References add_lwp(), inferior_ptid, ptid_get_pid(), purge_lwp_list(), registers_changed(), lwp_info::stopped, and thread_change_ptid().
Referenced by fork_load_infrun_state().
static void linux_nat_terminal_inferior | ( | void | ) | [static] |
Definition at line 4555 of file linux-nat.c.
References delete_file_handler(), input_fd, set_sigint_trap(), target_is_async_p, and terminal_inferior().
Referenced by linux_nat_add_target().
static void linux_nat_terminal_ours | ( | void | ) | [static] |
Definition at line 4578 of file linux-nat.c.
References add_file_handler(), clear_sigint_trap(), input_fd, stdin_event_handler(), target_is_async_p, and terminal_ours().
Referenced by linux_nat_add_target().
static struct address_space* linux_nat_thread_address_space | ( | struct target_ops * | t, |
ptid_t | ptid | ||
) | [static, read] |
Definition at line 4776 of file linux-nat.c.
References inferior::aspace, find_inferior_pid(), find_lwp_pid(), gdb_assert, arm-linux::inf, inferior::pid, lwp_info::ptid, ptid_get_lwp(), and ptid_get_pid().
Referenced by linux_nat_add_target().
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] |
Definition at line 3999 of file linux-nat.c.
References COMM_LEN, FORMAT, gdb_fopen_cloexec(), line, thread_info::ptid, ptid_get_lwp(), ptid_get_pid(), and strchr().
Referenced by linux_nat_add_target().
static ptid_t linux_nat_wait | ( | struct target_ops * | ops, |
ptid_t | ptid, | ||
struct target_waitstatus * | ourstatus, | ||
int | target_options | ||
) | [static] |
Definition at line 3648 of file linux-nat.c.
References async_file_flush(), async_file_mark(), debug_linux_nat, fprintf_unfiltered(), gdb_stdlog, inferior_event_handler(), iterate_over_lwps(), target_waitstatus::kind, linux_nat_wait_1(), minus_one_ptid, non_stop, ptid_equal(), resume_stopped_resumed_lwps(), target_async, target_can_async_p, target_options_to_string(), target_pid_to_str(), TARGET_WAITKIND_IGNORE, TARGET_WAITKIND_NO_RESUMED, and xfree().
Referenced by linux_nat_add_target().
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] |
Definition at line 3922 of file linux-nat.c.
References do_cleanups(), inferior_ptid, linux_xfer_siginfo(), LONGEST, null_ptid, pid_to_ptid(), ptid_equal(), ptid_get_lwp(), ptid_lwp_p(), save_inferior_ptid(), TARGET_OBJECT_MEMORY, TARGET_OBJECT_SIGNAL_INFO, and target_ops::to_xfer_partial.
Referenced by linux_nat_add_target().
void linux_proc_pending_signals | ( | int | pid, |
sigset_t * | pending, | ||
sigset_t * | blocked, | ||
sigset_t * | ignored | ||
) |
Definition at line 4295 of file linux-nat.c.
References _, add_line_to_sigset(), do_cleanups(), error(), gdb_fopen_cloexec(), and make_cleanup_fclose().
Referenced by linux_nat_has_pending_sigint().
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] |
Definition at line 4117 of file linux-nat.c.
References gdb_open_cloexec(), inferior_ptid, len, LONGEST, O_LARGEFILE, ptid_get_pid(), read(), and TARGET_OBJECT_MEMORY.
Referenced by linux_xfer_partial().
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] |
Definition at line 4211 of file linux-nat.c.
References gdb_open_cloexec(), inferior_ptid, ptid_get_pid(), read(), spu_enumerate_spu_ids(), and xsnprintf().
Referenced by linux_xfer_partial().
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] |
Definition at line 4480 of file linux-nat.c.
References inf_ptrace_target(), and linux_target_install_ops().
Referenced by _initialize_aarch64_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_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_target_install_ops | ( | struct target_ops * | t | ) | [static] |
Definition at line 4457 of file linux-nat.c.
References linux_child_follow_fork(), linux_child_insert_exec_catchpoint(), linux_child_insert_fork_catchpoint(), linux_child_insert_vfork_catchpoint(), linux_child_pid_to_exec_file(), linux_child_post_attach(), linux_child_post_startup_inferior(), linux_child_remove_exec_catchpoint(), linux_child_remove_fork_catchpoint(), linux_child_remove_vfork_catchpoint(), linux_child_set_syscall_catchpoint(), linux_nat_make_corefile_notes(), linux_xfer_partial(), super_xfer_partial, target_ops::to_follow_fork, target_ops::to_insert_exec_catchpoint, target_ops::to_insert_fork_catchpoint, target_ops::to_insert_vfork_catchpoint, target_ops::to_make_corefile_notes, target_ops::to_pid_to_exec_file, target_ops::to_post_attach, target_ops::to_post_startup_inferior, target_ops::to_remove_exec_catchpoint, target_ops::to_remove_fork_catchpoint, target_ops::to_remove_vfork_catchpoint, target_ops::to_set_syscall_catchpoint, and target_ops::to_xfer_partial.
Referenced by linux_target(), and linux_trad_target().
static int linux_thread_alive | ( | ptid_t | ptid | ) | [static] |
Definition at line 3953 of file linux-nat.c.
References debug_linux_nat, fprintf_unfiltered(), gdb_assert, gdb_stdlog, kill_lwp(), ptid_get_lwp(), ptid_lwp_p(), safe_strerror(), and target_pid_to_str().
Referenced by linux_nat_filter_event(), and linux_nat_thread_alive().
struct target_ops* linux_trad_target | ( | CORE_ADDR(*)(struct gdbarch *, int, int) | register_u_offset | ) | [read] |
Definition at line 4491 of file linux-nat.c.
References inf_ptrace_trad_target(), and linux_target_install_ops().
Referenced by _initialize_alpha_linux_nat(), and _initialize_mips_linux_nat().
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] |
Definition at line 4345 of file linux-nat.c.
References gdbarch_addr_bit(), HOST_CHAR_BIT, linux_nat_xfer_osdata(), linux_proc_xfer_partial(), linux_proc_xfer_spu(), LONGEST, memory_xfer_auxv(), super_xfer_partial, target_gdbarch(), TARGET_OBJECT_AUXV, TARGET_OBJECT_MEMORY, TARGET_OBJECT_OSDATA, TARGET_OBJECT_SPU, and ULONGEST.
Referenced by linux_target_install_ops().
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] |
Definition at line 3869 of file linux-nat.c.
References gdb_assert, inferior_ptid, len, memcpy(), ptid_get_lwp(), ptid_get_pid(), ptrace(), PTRACE_GETSIGINFO, PTRACE_TYPE_ARG3, siginfo_fixup(), and TARGET_OBJECT_SIGNAL_INFO.
Referenced by linux_nat_xfer_partial().
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] |
Definition at line 2446 of file linux-nat.c.
References debug_linux_nat, fprintf_unfiltered(), gdb_stdlog, lwp_info::ignore_sigint, linux_nat_has_pending_sigint(), lwp_info::ptid, ptid_get_lwp(), and target_pid_to_str().
Referenced by linux_nat_wait_1(), and stop_wait_callback().
Definition at line 356 of file linux-nat.c.
References lwp_list, lwp_info::next, lwp_info::ptid, and ptid_get_pid().
Referenced by check_zombie_leaders(), linux_nat_detach(), linux_nat_filter_event(), and linux_nat_pid_to_str().
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] |
Definition at line 896 of file linux-nat.c.
References lwp_free(), lwp_info::next, lwp_info::ptid, and ptid_get_pid().
Referenced by linux_nat_mourn_inferior(), and linux_nat_switch_fork().
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] |
Definition at line 1620 of file linux-nat.c.
References debug_linux_nat, find_inferior_pid(), fprintf_unfiltered(), gdb_signal_to_host(), gdb_stdlog, target_waitstatus::kind, linux_nat_prepare_to_resume, pid_to_ptid(), lwp_info::ptid, ptid_get_lwp(), ptid_get_pid(), lwp_info::status, lwp_info::step, lwp_info::stopped, lwp_info::stopped_by_watchpoint, target_pid_to_str(), TARGET_WAITKIND_IGNORE, target_ops::to_resume, inferior::vfork_child, and lwp_info::waitstatus.
Referenced by linux_nat_resume_callback(), and stop_and_resume_callback().
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] |
Definition at line 3605 of file linux-nat.c.
References breakpoint_inserted_here_p(), debug_linux_nat, fprintf_unfiltered(), gdb_assert, gdb_stdlog, get_regcache_arch(), get_regcache_aspace(), get_thread_regcache(), is_executing(), target_waitstatus::kind, linux_nat_prepare_to_resume, paddress(), pid_to_ptid(), lwp_info::ptid, ptid_get_lwp(), ptid_match(), regcache_read_pc(), registers_changed(), lwp_info::resumed, lwp_info::status, lwp_info::step, lwp_info::stopped, lwp_info::stopped_by_watchpoint, target_pid_to_str(), TARGET_WAITKIND_IGNORE, target_ops::to_resume, and lwp_info::waitstatus.
Referenced by linux_nat_wait().
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] |
Definition at line 2673 of file linux-nat.c.
References target_waitstatus::kind, lwp_info::resumed, lwp_info::status, lwp_info::stopped, TARGET_WAITKIND_IGNORE, and lwp_info::waitstatus.
Referenced by linux_nat_filter_event().
static void save_sigtrap | ( | struct lwp_info * | lp | ) | [static] |
Definition at line 2477 of file linux-nat.c.
References current_target, do_cleanups(), inferior_ptid, lwp_info::ptid, save_inferior_ptid(), lwp_info::stopped_by_watchpoint, lwp_info::stopped_data_address, lwp_info::stopped_data_address_p, target_ops::to_stopped_by_watchpoint, and target_ops::to_stopped_data_address.
Referenced by linux_nat_filter_event(), and stop_wait_callback().
static void select_event_lwp | ( | ptid_t | filter, |
struct lwp_info ** | orig_lp, | ||
int * | status | ||
) | [static] |
Definition at line 2790 of file linux-nat.c.
References count_events_callback(), debug_linux_nat, fprintf_unfiltered(), gdb_stdlog, int, iterate_over_lwps(), lwp_info::ptid, select_event_lwp_callback(), select_singlestep_lwp_callback(), lwp_info::status, exsummary::status, and target_pid_to_str().
Referenced by linux_nat_wait_1().
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] |
Definition at line 4610 of file linux-nat.c.
References async_file_mark(), debug_linux_nat, gdb_stdlog, linux_nat_event_pipe, and ui_file_write_async_safe().
Referenced by _initialize_linux_nat(), and lin_thread_get_thread_signals().
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] |
Definition at line 4160 of file linux-nat.c.
References dirent, gdbarch_byte_order(), LONGEST, SPUFS_MAGIC, store_unsigned_integer(), target_gdbarch(), and xsnprintf().
Referenced by linux_proc_xfer_spu().
static int status_callback | ( | struct lwp_info * | lp, |
void * | data | ||
) | [static] |
Definition at line 2647 of file linux-nat.c.
References target_waitstatus::kind, lwp_info::resumed, lwp_info::status, TARGET_WAITKIND_IGNORE, and lwp_info::waitstatus.
Referenced by linux_nat_wait_1().
static char* status_to_str | ( | int | status | ) | [static] |
Definition at line 862 of file linux-nat.c.
References SYSCALL_SIGTRAP.
Referenced by lin_lwp_attach_lwp(), linux_handle_extended_wait(), linux_nat_attach(), linux_nat_post_attach_wait(), linux_nat_wait_1(), stop_wait_callback(), and wait_lwp().
static int stop_and_resume_callback | ( | struct lwp_info * | lp, |
void * | data | ||
) | [static] |
Definition at line 2855 of file linux-nat.c.
References debug_linux_nat, find_lwp_pid(), fprintf_unfiltered(), gdb_stdlog, lwp_info::last_resume_kind, lwp_info::ptid, ptid_get_lwp(), resume_lwp(), resume_stop, lwp_info::status, lwp_info::step, stop_callback(), stop_wait_callback(), and lwp_info::stopped.
Referenced by linux_nat_filter_event().
static int stop_callback | ( | struct lwp_info * | lp, |
void * | data | ||
) | [static] |
Definition at line 2370 of file linux-nat.c.
References debug_linux_nat, fprintf_unfiltered(), gdb_assert, gdb_stdlog, kill_lwp(), lwp_info::ptid, ptid_get_lwp(), safe_strerror(), lwp_info::signalled, lwp_info::status, lwp_info::stopped, and target_pid_to_str().
Referenced by linux_nat_detach(), linux_nat_kill(), linux_nat_stop_lwp(), linux_nat_wait_1(), linux_stop_lwp(), and stop_and_resume_callback().
static int stop_wait_callback | ( | struct lwp_info * | lp, |
void * | data | ||
) | [static] |
Definition at line 2569 of file linux-nat.c.
References debug_linux_nat, find_inferior_pid(), fprintf_unfiltered(), gdb_assert, gdb_stdlog, lwp_info::ignore_sigint, maybe_clear_ignore_sigint(), lwp_info::ptid, ptid_get_lwp(), ptid_get_pid(), ptrace(), safe_strerror(), save_sigtrap(), lwp_info::signalled, lwp_info::status, exsummary::status, status_to_str(), lwp_info::stopped, target_pid_to_str(), inferior::vfork_child, and wait_lwp().
Referenced by linux_nat_detach(), linux_nat_kill(), linux_nat_wait_1(), and stop_and_resume_callback().
static VEC | ( | static_tracepoint_marker_p | ) | [static] |
Definition at line 4397 of file linux-nat.c.
References agent_run_command(), cleanup_target_stop(), do_cleanups(), free_current_marker(), inferior_ptid, IPA_CMD_BUF_SIZE, make_cleanup(), memcpy(), memset(), p, parse_static_tracepoint_marker_definition(), ptid_build(), ptid_get_pid(), release_static_tracepoint_marker(), static_tracepoint_marker::str_id, target_stop(), VEC, and VEC_safe_push.
Definition at line 2237 of file linux-nat.c.
References block_child_signals(), debug_linux_nat, exit_lwp(), fprintf_unfiltered(), gdb_assert, gdb_stdlog, linux_handle_extended_wait(), linux_handle_syscall_trap(), linux_proc_pid_is_zombie(), my_waitpid(), lwp_info::ptid, ptid_get_lwp(), ptid_get_pid(), restore_child_signals_mask(), lwp_info::status, exsummary::status, status_to_str(), lwp_info::stopped, SYSCALL_SIGTRAP, and target_pid_to_str().
Referenced by stop_wait_callback().
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().
int async_terminal_is_ours = 1 [static] |
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 209 of file linux-nat.c.
Referenced by _initialize_linux_nat(), cancel_breakpoint(), check_zombie_leaders(), detach_callback(), get_pending_status(), kill_callback(), kill_wait_callback(), lin_lwp_attach_lwp(), linux_child_follow_fork(), linux_handle_extended_wait(), linux_handle_syscall_trap(), linux_nat_attach(), linux_nat_detach(), linux_nat_filter_event(), linux_nat_post_attach_wait(), linux_nat_resume(), linux_nat_stop_lwp(), linux_nat_wait(), linux_nat_wait_1(), linux_thread_alive(), maybe_clear_ignore_sigint(), resume_lwp(), resume_stopped_resumed_lwps(), select_event_lwp(), sigchld_handler(), stop_and_resume_callback(), stop_callback(), stop_wait_callback(), and wait_lwp().
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 230 of file linux-nat.c.
Referenced by async_file_flush(), async_file_mark(), linux_async_pipe(), linux_nat_async(), and sigchld_handler().
Definition at line 189 of file linux-nat.c.
Referenced by linux_nat_forget_process(), and linux_nat_set_forget_process().
linux_nat_new_fork_ftype* linux_nat_new_fork [static] |
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] |
Definition at line 192 of file linux-nat.c.
Referenced by detach_callback(), linux_child_follow_fork(), linux_handle_extended_wait(), linux_handle_syscall_trap(), linux_nat_detach(), linux_nat_filter_event(), linux_nat_resume(), linux_nat_set_prepare_to_resume(), linux_nat_wait_1(), resume_lwp(), and resume_stopped_resumed_lwps().
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().
int(* linux_nat_status_is_event)(int status) = sigtrap_is_event [static] |
Definition at line 2539 of file linux-nat.c.
Referenced by linux_nat_filter_event(), linux_nat_lp_status_is_event(), linux_nat_set_status_is_event(), and linux_nat_wait_1().
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().
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().
struct simple_pid_list* stopped_pids |
Definition at line 224 of file linux-nat.c.
LONGEST(* super_xfer_partial)(struct target_ops *, enum target_object, const char *, gdb_byte *, const gdb_byte *, ULONGEST, LONGEST) [static] |
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.