GDB (xrefs)
|
#include "defs.h"
#include "inferior.h"
#include "infrun.h"
#include "target.h"
#include "gdbcore.h"
#include "elf-bfd.h"
#include "gdbcmd.h"
#include "gdbthread.h"
#include "regcache.h"
#include "inf-child.h"
#include "filestuff.h"
#include <sys/procfs.h>
#include <sys/syscall.h>
#include "gdb_wait.h"
#include <signal.h>
#include <ctype.h>
#include "gdb_bfd.h"
#include "inflow.h"
#include "auxv.h"
#include "procfs.h"
#include "observer.h"
#include <fcntl.h>
#include <unistd.h>
#include <sys/stat.h>
#include "proc-utils.h"
#include "gregset.h"
Go to the source code of this file.
Classes | |
struct | procinfo |
Macros | |
#define | gdb_praddset(sp, flag) ((void) praddset (sp, flag)) |
#define | gdb_prdelset(sp, flag) ((void) prdelset (sp, flag)) |
#define | gdb_premptysysset premptyset |
#define | gdb_praddsysset gdb_praddset |
#define | gdb_prdelsysset gdb_prdelset |
#define | gdb_pr_issyssetmember prismember |
#define | MAIN_PROC_NAME_FMT "/proc/%05d" |
#define | CTL_PROC_NAME_FMT "/proc/%05d" |
#define | AS_PROC_NAME_FMT "/proc/%05d" |
#define | MAP_PROC_NAME_FMT "/proc/%05d" |
#define | STATUS_PROC_NAME_FMT "/proc/%05d" |
#define | MAX_PROC_NAME_SIZE sizeof("/proc/ttttppppp") |
Typedefs | |
typedef sigset_t | gdb_sigset_t |
typedef struct sigaction | gdb_sigaction_t |
typedef siginfo_t | gdb_siginfo_t |
typedef prstatus_t | gdb_prstatus_t |
typedef prstatus_t | gdb_lwpstatus_t |
typedef struct procinfo | procinfo |
Enumerations | |
enum | { READ_WATCHFLAG = MA_READ, WRITE_WATCHFLAG = MA_WRITE, EXEC_WATCHFLAG = MA_EXEC, AFTER_WATCHFLAG = 0 } |
enum | { FD_CTL, FD_STATUS, FD_AS } |
enum | { NOKILL, KILL } |
enum | { FLAG_RESET, FLAG_SET } |
Variables | |
static target_xfer_partial_ftype | procfs_xfer_partial |
static char | errmsg [128] |
static procinfo * | procinfo_list |
#define gdb_praddset | ( | sp, | |
flag | |||
) | ((void) praddset (sp, flag)) |
#define gdb_praddsysset gdb_praddset |
Definition at line 282 of file procfs.c.
Referenced by proc_trace_syscalls_1(), procfs_debug_inferior(), and procfs_set_exec_trap().
#define gdb_prdelset | ( | sp, | |
flag | |||
) | ((void) prdelset (sp, flag)) |
Definition at line 269 of file procfs.c.
Referenced by procfs_debug_inferior(), and procfs_pass_signals().
#define gdb_prdelsysset gdb_prdelset |
Definition at line 289 of file procfs.c.
Referenced by proc_trace_syscalls_1().
#define gdb_premptysysset premptyset |
Definition at line 275 of file procfs.c.
Referenced by proc_get_traced_sysentry(), proc_get_traced_sysexit(), procfs_debug_inferior(), and procfs_set_exec_trap().
#define MAIN_PROC_NAME_FMT "/proc/%05d" |
Definition at line 352 of file procfs.c.
Referenced by create_procinfo().
#define MAX_PROC_NAME_SIZE sizeof("/proc/ttttppppp") |
Definition at line 357 of file procfs.c.
Referenced by iterate_over_mappings(), and open_procinfo_files().
typedef prstatus_t gdb_lwpstatus_t |
typedef prstatus_t gdb_prstatus_t |
typedef struct sigaction gdb_sigaction_t |
typedef siginfo_t gdb_siginfo_t |
typedef sigset_t gdb_sigset_t |
anonymous enum |
void _initialize_procfs | ( | void | ) |
Definition at line 5271 of file procfs.c.
References _, add_com(), no_class, observer_attach_inferior_created(), proc_trace_sysentry_cmd(), proc_trace_sysexit_cmd(), proc_untrace_sysentry_cmd(), proc_untrace_sysexit_cmd(), and procfs_inferior_created().
|
static |
Definition at line 728 of file procfs.c.
References procinfo::as_fd, procinfo::ctl_fd, and procinfo::status_fd.
Referenced by destroy_one_procinfo(), and invalidate_cache().
Definition at line 680 of file procfs.c.
References find_procinfo(), find_procinfo_or_die(), MAIN_PROC_NAME_FMT, procinfo::next, procinfo::pathname, procinfo::pid, pid, procinfo_list, procinfo::saved_entryset, procinfo::saved_exitset, sysset_t_alloc(), procinfo::thread_list, procinfo::tid, and xmalloc().
Referenced by do_attach(), procfs_info_proc(), procfs_init_inferior(), procfs_set_exec_trap(), and procfs_wait().
Definition at line 804 of file procfs.c.
References destroy_procinfo(), error(), KILL, procinfo::pathname, procinfo::pid, and print_sys_errmsg().
Referenced by do_attach(), and procfs_init_inferior().
Definition at line 744 of file procfs.c.
References close_procinfo_files(), procinfo::next, procinfo::saved_entryset, procinfo::saved_exitset, and xfree().
Referenced by destroy_procinfo(), and proc_delete_dead_threads().
|
static |
Definition at line 772 of file procfs.c.
References destroy_one_procinfo(), find_procinfo(), procinfo::pid, procinfo::thread_list, and procinfo::tid.
Referenced by dead_procinfo(), do_destroy_procinfo_cleanup(), do_detach(), procfs_mourn_inferior(), procfs_thread_alive(), and unconditionally_kill_inferior().
Definition at line 3084 of file procfs.c.
References _, add_thread(), inferior::attach_flag, create_procinfo(), current_inferior(), dead_procinfo(), FD_CTL, fprintf_filtered(), gdb_stderr, procinfo::ignore_next_sigstop, arm-linux::inf, inferior_appeared(), NOKILL, open_procinfo_files(), procinfo::pid, proc_flags(), proc_get_current_thread(), proc_get_held_signals(), proc_get_traced_faults(), proc_get_traced_signals(), proc_get_traced_sysentry(), proc_get_traced_sysexit(), proc_prettyprint_why(), proc_set_run_on_last_close(), proc_stop_process(), proc_what(), proc_why(), procfs_debug_inferior(), ptid_build(), ptid_get_pid(), procinfo::saved_entryset, procinfo::saved_exitset, procinfo::saved_fltset, procinfo::saved_sighold, procinfo::saved_sigset, and procinfo::was_stopped.
Referenced by procfs_attach().
|
static |
Definition at line 792 of file procfs.c.
References destroy_procinfo().
Referenced by procfs_info_proc().
|
static |
Definition at line 3154 of file procfs.c.
References _, destroy_procinfo(), find_procinfo_or_die(), inferior_ptid, proc_clear_current_fault(), proc_clear_current_signal(), proc_flags(), proc_set_current_signal(), proc_set_held_signals(), proc_set_run_on_last_close(), proc_set_traced_faults(), proc_set_traced_signals(), proc_set_traced_sysentry(), proc_set_traced_sysexit(), proc_warn(), ptid_get_pid(), query(), procinfo::saved_entryset, procinfo::saved_exitset, procinfo::saved_fltset, procinfo::saved_sighold, procinfo::saved_sigset, and procinfo::was_stopped.
Referenced by procfs_detach().
|
static |
Definition at line 4963 of file procfs.c.
Referenced by proc_find_memory_regions().
Definition at line 447 of file procfs.c.
References procinfo::next, procinfo::pid, procinfo::thread_list, and procinfo::tid.
Referenced by create_procinfo(), destroy_procinfo(), find_procinfo_or_die(), open_procinfo_files(), procfs_info_proc(), procfs_kill_inferior(), procfs_mourn_inferior(), procfs_resume(), procfs_thread_alive(), and procfs_wait().
Definition at line 476 of file procfs.c.
References _, error(), and find_procinfo().
Referenced by create_procinfo(), do_detach(), proc_clear_current_fault(), proc_clear_current_signal(), proc_find_memory_regions(), proc_get_held_signals(), proc_get_traced_faults(), proc_get_traced_signals(), proc_get_traced_sysentry(), proc_get_traced_sysexit(), proc_iterate_over_threads(), proc_modify_flag(), proc_parent_pid(), proc_set_current_signal(), proc_set_held_signals(), proc_set_traced_faults(), proc_set_traced_signals(), proc_set_traced_sysentry(), proc_set_traced_sysexit(), proc_trace_syscalls(), proc_wait_for_stop(), procfs_fetch_registers(), procfs_inferior_created(), procfs_pass_signals(), procfs_resume(), procfs_set_watchpoint(), procfs_stopped_by_watchpoint(), procfs_stopped_data_address(), procfs_store_registers(), procfs_update_thread_list(), procfs_wait(), and procfs_xfer_memory().
|
static |
Definition at line 5028 of file procfs.c.
References gdbarch_addr_bit(), if(), int, gdb.printing::long, mappingflags(), printf_filtered(), and target_gdbarch().
Referenced by info_proc_mappings().
Definition at line 5060 of file procfs.c.
References _, gdbarch_ptr_bit(), info_mappings_callback(), iterate_over_mappings(), printf_filtered(), and target_gdbarch().
Referenced by procfs_info_proc().
Definition at line 4017 of file procfs.c.
References close_procinfo_files(), procinfo::fpregs_valid, gdbarch_fp0_regnum(), procinfo::gregs_valid, proc_get_current_thread(), proc_set_fpregs(), proc_set_gregs(), proc_warn(), procinfo::status_valid, target_gdbarch(), procinfo::threads_valid, and procinfo::tid.
Referenced by procfs_resume().
|
static |
Referenced by info_proc_mappings(), and proc_find_memory_regions().
|
static |
Definition at line 4899 of file procfs.c.
References procinfo::ctl_fd, do_cleanups(), func, make_cleanup(), make_cleanup_close(), MAX_PROC_NAME_SIZE, null_cleanup(), procinfo::pid, proc_error(), and read().
|
static |
Definition at line 5000 of file procfs.c.
Referenced by info_mappings_callback().
Definition at line 535 of file procfs.c.
References procinfo::as_fd, procinfo::ctl_fd, FD_AS, FD_CTL, FD_STATUS, find_procinfo(), MAX_PROC_NAME_SIZE, open_with_retry(), procinfo::pathname, procinfo::pid, procinfo::status_fd, and procinfo::tid.
Referenced by do_attach(), proc_get_fpregs(), proc_get_status(), proc_get_traced_sysentry(), proc_get_traced_sysexit(), proc_kill(), proc_run_process(), proc_set_fpregs(), proc_set_gregs(), proc_stop_process(), procfs_info_proc(), procfs_init_inferior(), procfs_set_exec_trap(), and procfs_xfer_memory().
Definition at line 2026 of file procfs.c.
References procinfo::ctl_fd, find_procinfo_or_die(), procinfo::pid, and procinfo::tid.
Referenced by do_detach().
Definition at line 2133 of file procfs.c.
References procinfo::ctl_fd, find_procinfo_or_die(), procinfo::pid, and procinfo::tid.
Referenced by do_detach().
Definition at line 2700 of file procfs.c.
References destroy_one_procinfo(), proc_get_status(), procinfo::status_valid, and procinfo::thread_list.
Definition at line 1030 of file procfs.c.
References procinfo::pathname, and perror_with_name().
Referenced by iterate_over_mappings(), proc_trace_syscalls_1(), procfs_fetch_registers(), procfs_info_proc(), procfs_init_inferior(), procfs_pass_signals(), procfs_resume(), procfs_set_watchpoint(), procfs_store_registers(), procfs_wait(), and unconditionally_kill_inferior().
|
static |
Definition at line 4988 of file procfs.c.
References find_memory_regions_callback(), find_procinfo_or_die(), inferior_ptid, iterate_over_mappings(), and ptid_get_pid().
Referenced by procfs_target().
|
static |
Definition at line 1127 of file procfs.c.
References proc_get_status(), procinfo::prstatus, and procinfo::status_valid.
Referenced by do_attach(), do_detach(), proc_get_status(), proc_stop_process(), proc_wait_for_stop(), procfs_info_proc(), procfs_init_inferior(), procfs_stopped_by_watchpoint(), and procfs_wait().
Definition at line 2686 of file procfs.c.
Referenced by do_attach(), invalidate_cache(), proc_get_status(), proc_stop_process(), proc_wait_for_stop(), procfs_init_inferior(), and procfs_wait().
|
static |
Definition at line 2193 of file procfs.c.
References procinfo::ctl_fd, FD_CTL, procinfo::fpregs_valid, procinfo::fpregset, open_procinfo_files(), proc_get_status(), procinfo::prstatus, procinfo::status_valid, and procinfo::tid.
Referenced by proc_set_fpregs(), procfs_fetch_registers(), and procfs_store_registers().
|
static |
Definition at line 2176 of file procfs.c.
References procinfo::gregs_valid, proc_get_status(), procinfo::prstatus, and procinfo::status_valid.
Referenced by proc_set_gregs(), procfs_fetch_registers(), and procfs_store_registers().
|
static |
Definition at line 1783 of file procfs.c.
References procinfo::ctl_fd, find_procinfo_or_die(), procinfo::pid, proc_get_status(), procinfo::prstatus, procinfo::status_valid, and procinfo::tid.
Referenced by do_attach(), and procfs_init_inferior().
Definition at line 2632 of file procfs.c.
Referenced by procfs_info_proc().
Definition at line 1043 of file procfs.c.
References FD_STATUS, procinfo::fpregs_valid, procinfo::gregs_valid, open_procinfo_files(), proc_flags(), proc_get_current_thread(), PROC_PRETTYFPRINT_STATUS, proc_what(), proc_why(), procinfo::prstatus, read(), SEEK_SET, procinfo::status_fd, procinfo::status_valid, and procinfo::tid.
Referenced by proc_delete_dead_threads(), proc_flags(), proc_get_fpregs(), proc_get_gregs(), proc_get_held_signals(), proc_get_traced_faults(), proc_get_traced_signals(), proc_get_traced_sysentry(), proc_get_traced_sysexit(), proc_nsysarg(), proc_parent_pid(), proc_set_current_signal(), proc_sysargs(), proc_watchpoint_address(), proc_what(), proc_why(), and procfs_thread_alive().
|
static |
Definition at line 1855 of file procfs.c.
References procinfo::ctl_fd, find_procinfo_or_die(), procinfo::pid, proc_get_status(), procinfo::prstatus, procinfo::status_valid, and procinfo::tid.
Referenced by do_attach(), and procfs_init_inferior().
|
static |
Definition at line 1819 of file procfs.c.
References procinfo::ctl_fd, find_procinfo_or_die(), procinfo::pid, proc_get_status(), procinfo::prstatus, procinfo::status_valid, and procinfo::tid.
Referenced by do_attach(), and procfs_init_inferior().
|
static |
Definition at line 1891 of file procfs.c.
References procinfo::ctl_fd, FD_STATUS, find_procinfo_or_die(), gdb_premptysysset, open_procinfo_files(), procinfo::pid, proc_get_status(), procinfo::prstatus, read(), SEEK_SET, size, procinfo::status_fd, procinfo::status_valid, sysset_t_alloc(), sysset_t_size(), and procinfo::tid.
Referenced by do_attach(), proc_trace_syscalls_1(), and procfs_init_inferior().
|
static |
Definition at line 1958 of file procfs.c.
References procinfo::ctl_fd, FD_STATUS, find_procinfo_or_die(), gdb_premptysysset, open_procinfo_files(), procinfo::pid, proc_get_status(), procinfo::prstatus, read(), SEEK_SET, size, procinfo::status_fd, procinfo::status_valid, sysset_t_alloc(), sysset_t_size(), and procinfo::tid.
Referenced by do_attach(), proc_trace_syscalls_1(), and procfs_init_inferior().
|
static |
Definition at line 2867 of file procfs.c.
References find_procinfo_or_die(), func, cleanup::next, procinfo::next, procinfo::pid, procinfo::thread_list, and procinfo::tid.
Referenced by procfs_resume(), and procfs_update_thread_list().
Definition at line 2360 of file procfs.c.
References procinfo::ctl_fd, FD_CTL, and open_procinfo_files().
Referenced by unconditionally_kill_inferior().
Definition at line 1283 of file procfs.c.
References _, procinfo::ctl_fd, find_procinfo_or_die(), FLAG_RESET, FLAG_SET, procinfo::pid, procinfo::status_valid, and warning().
Referenced by proc_set_run_on_last_close(), proc_unset_inherit_on_fork(), and proc_unset_run_on_last_close().
Definition at line 1202 of file procfs.c.
References proc_get_status(), procinfo::prstatus, and procinfo::status_valid.
Referenced by procfs_wait().
Definition at line 2394 of file procfs.c.
References find_procinfo_or_die(), procinfo::pid, proc_get_status(), procinfo::prstatus, procinfo::status_valid, and procinfo::tid.
Referenced by unconditionally_kill_inferior().
Definition at line 1530 of file procfs.c.
References procinfo::ctl_fd, FD_CTL, open_procinfo_files(), and proc_set_current_signal().
Referenced by procfs_resume(), and procfs_wait().
Definition at line 2060 of file procfs.c.
References procinfo::ctl_fd, find_procinfo_or_die(), gdb_signal_from_host(), get_last_target_status(), inferior_ptid, target_waitstatus::kind, procinfo::pid, proc_get_status(), procinfo::prstatus, ptid_equal(), target_waitstatus::sig, TARGET_WAITKIND_STOPPED, procinfo::tid, and target_waitstatus::value.
Referenced by do_detach(), and proc_run_process().
Definition at line 2302 of file procfs.c.
References procinfo::ctl_fd, FD_CTL, procinfo::fpregs_valid, open_procinfo_files(), proc_get_fpregs(), and procinfo::tid.
Referenced by invalidate_cache(), and procfs_store_registers().
Definition at line 2262 of file procfs.c.
References procinfo::ctl_fd, FD_CTL, procinfo::gregs_valid, open_procinfo_files(), and proc_get_gregs().
Referenced by invalidate_cache(), and procfs_store_registers().
|
static |
Definition at line 1745 of file procfs.c.
References procinfo::ctl_fd, find_procinfo_or_die(), procinfo::pid, procinfo::status_valid, and procinfo::tid.
Referenced by do_detach().
Definition at line 1385 of file procfs.c.
References FLAG_SET, and proc_modify_flag().
Referenced by do_attach(), do_detach(), and procfs_init_inferior().
Definition at line 1617 of file procfs.c.
References procinfo::ctl_fd, find_procinfo_or_die(), procinfo::pid, procinfo::status_valid, and procinfo::tid.
Referenced by do_detach(), and procfs_debug_inferior().
|
static |
Definition at line 1577 of file procfs.c.
References _, procinfo::ctl_fd, find_procinfo_or_die(), procinfo::pid, procinfo::status_valid, procinfo::tid, and warning().
Referenced by do_detach(), procfs_debug_inferior(), and procfs_pass_signals().
Definition at line 1655 of file procfs.c.
References procinfo::ctl_fd, find_procinfo_or_die(), procinfo::pid, procinfo::status_valid, procinfo::tid, xfree(), and xmalloc().
Referenced by do_detach(), proc_trace_syscalls_1(), and procfs_debug_inferior().
Definition at line 1700 of file procfs.c.
References procinfo::ctl_fd, find_procinfo_or_die(), procinfo::pid, procinfo::status_valid, procinfo::tid, xfree(), and xmalloc().
Referenced by do_detach(), proc_trace_syscalls_1(), procfs_debug_inferior(), and procfs_set_exec_trap().
Definition at line 2430 of file procfs.c.
References procinfo::ctl_fd, and len.
Referenced by procfs_set_watchpoint().
Definition at line 1437 of file procfs.c.
References procinfo::ctl_fd, FD_CTL, open_procinfo_files(), proc_flags(), proc_get_current_thread(), PROC_PRETTYFPRINT_STATUS, proc_what(), proc_why(), procinfo::prstatus, and procinfo::status_valid.
Referenced by do_attach().
|
static |
Definition at line 1219 of file procfs.c.
References proc_get_status(), procinfo::prstatus, and procinfo::status_valid.
Referenced by procfs_wait().
Definition at line 5223 of file procfs.c.
References _, error(), error_no_arg(), find_procinfo_or_die(), inferior_ptid, proc_trace_syscalls_1(), and ptid_get_pid().
Referenced by proc_trace_sysentry_cmd(), proc_trace_sysexit_cmd(), proc_untrace_sysentry_cmd(), and proc_untrace_sysexit_cmd().
|
static |
Definition at line 5192 of file procfs.c.
References FLAG_SET, gdb_praddsysset, gdb_prdelsysset, proc_error(), proc_get_traced_sysentry(), proc_get_traced_sysexit(), proc_set_traced_sysentry(), and proc_set_traced_sysexit().
Referenced by proc_trace_syscalls(), procfs_inferior_created(), procfs_init_inferior(), and procfs_wait().
|
static |
Definition at line 5243 of file procfs.c.
References FLAG_SET, and proc_trace_syscalls().
Referenced by _initialize_procfs().
|
static |
Definition at line 5249 of file procfs.c.
References FLAG_SET, and proc_trace_syscalls().
Referenced by _initialize_procfs().
Definition at line 1406 of file procfs.c.
References FLAG_RESET, and proc_modify_flag().
Referenced by procfs_set_exec_trap().
Definition at line 1395 of file procfs.c.
References FLAG_RESET, and proc_modify_flag().
Referenced by procfs_set_exec_trap().
|
static |
Definition at line 5255 of file procfs.c.
References FLAG_RESET, and proc_trace_syscalls().
Referenced by _initialize_procfs().
|
static |
Definition at line 5261 of file procfs.c.
References FLAG_RESET, and proc_trace_syscalls().
Referenced by _initialize_procfs().
Definition at line 2845 of file procfs.c.
Referenced by procfs_update_thread_list().
Definition at line 1474 of file procfs.c.
References procinfo::ctl_fd, find_procinfo_or_die(), procinfo::pid, proc_flags(), proc_get_current_thread(), PROC_PRETTYFPRINT_STATUS, proc_what(), proc_why(), procinfo::prstatus, procinfo::status_valid, and procinfo::tid.
Referenced by procfs_init_inferior(), and procfs_wait().
Definition at line 1023 of file procfs.c.
References procinfo::pathname, and print_sys_errmsg().
Referenced by do_detach(), invalidate_cache(), procfs_set_exec_trap(), and procfs_xfer_memory().
Definition at line 1178 of file procfs.c.
References builtin_type::builtin_data_ptr, builtin_type(), gdbarch_pointer_to_address(), proc_get_status(), procinfo::prstatus, procinfo::status_valid, and target_gdbarch().
Referenced by procfs_stopped_data_address().
Definition at line 1159 of file procfs.c.
References proc_get_status(), procinfo::prstatus, and procinfo::status_valid.
Referenced by do_attach(), proc_get_status(), proc_stop_process(), proc_wait_for_stop(), procfs_info_proc(), procfs_stopped_by_watchpoint(), and procfs_wait().
Definition at line 1143 of file procfs.c.
References proc_get_status(), procinfo::prstatus, and procinfo::status_valid.
Referenced by do_attach(), proc_get_status(), proc_stop_process(), proc_wait_for_stop(), procfs_info_proc(), procfs_stopped_by_watchpoint(), and procfs_wait().
|
static |
Definition at line 3026 of file procfs.c.
References _, do_attach(), error(), get_exec_file(), inferior_ptid, parse_pid_to_attach(), pid, pid_to_ptid(), printf_filtered(), push_target(), target_is_pushed(), and target_pid_to_str().
Referenced by procfs_target().
|
static |
Definition at line 4767 of file procfs.c.
References builtin_type::builtin_data_ptr, builtin_type(), target_gdbarch(), and TYPE_LENGTH.
Referenced by procfs_use_watchpoints().
|
static |
Definition at line 4528 of file procfs.c.
References _, error(), fork_inferior(), len, pid, procfs_init_inferior(), and procfs_set_exec_trap().
Referenced by procfs_target().
Definition at line 2913 of file procfs.c.
References procinfo::ctl_fd, gdb_praddsysset, gdb_prdelset, gdb_premptysysset, proc_set_traced_faults(), proc_set_traced_signals(), proc_set_traced_sysentry(), proc_set_traced_sysexit(), status, sysset_t_alloc(), and xfree().
Referenced by do_attach(), and procfs_init_inferior().
|
static |
Definition at line 3055 of file procfs.c.
References _, detach_inferior(), do_detach(), gdb_flush(), gdb_stdout, get_exec_file(), inf_child_maybe_unpush_target(), inferior_ptid, null_ptid, pid, pid_to_ptid(), printf_filtered(), ptid_get_pid(), and target_pid_to_str().
Referenced by procfs_target().
|
static |
Definition at line 3213 of file procfs.c.
References _, error(), find_procinfo_or_die(), gdbarch_fp0_regnum(), gdbarch_pc_regnum(), gdbarch_sp_regnum(), get_regcache_arch(), inferior_ptid, pid, proc_error(), proc_get_fpregs(), proc_get_gregs(), ptid_get_lwp(), ptid_get_pid(), supply_fpregset(), supply_gregset(), and target_pid_to_str().
Referenced by procfs_target().
|
static |
Definition at line 4194 of file procfs.c.
References _, inferior::attach_flag, current_inferior(), inferior_ptid, printf_filtered(), and target_pid_to_str().
Referenced by procfs_target().
ptid_t procfs_first_available | ( | void | ) |
Definition at line 5298 of file procfs.c.
References procinfo::pid, and pid_to_ptid().
Referenced by rw_common(), sol_thread_resume(), sol_thread_wait(), and sol_thread_xfer_partial().
|
static |
Definition at line 4612 of file procfs.c.
References current_inferior(), current_target, find_procinfo_or_die(), FLAG_RESET, inferior_ptid, proc_trace_syscalls_1(), ptid_get_pid(), and target_can_run.
Referenced by _initialize_procfs().
|
static |
Definition at line 5088 of file procfs.c.
References _, create_procinfo(), do_cleanups(), do_destroy_procinfo_cleanup(), error(), FD_CTL, find_procinfo(), gdb_buildargv(), inferior_ptid, info_proc_mappings(), IP_ALL, IP_MAPPINGS, IP_MINIMAL, make_cleanup(), make_cleanup_freeargv(), mappings, null_cleanup(), open_procinfo_files(), procinfo::pid, pid, printf_filtered(), proc_error(), proc_flags(), proc_get_nthreads(), proc_prettyprint_flags(), proc_prettyprint_why(), proc_what(), proc_why(), ptid_get_pid(), and procinfo::tid.
Referenced by procfs_target().
|
static |
Definition at line 4306 of file procfs.c.
References _, create_procinfo(), dead_procinfo(), FD_CTL, FLAG_SET, KILL, open_procinfo_files(), pid_to_ptid(), proc_error(), proc_flags(), proc_get_current_thread(), proc_get_held_signals(), proc_get_traced_faults(), proc_get_traced_signals(), proc_get_traced_sysentry(), proc_get_traced_sysexit(), proc_set_run_on_last_close(), proc_trace_syscalls_1(), proc_wait_for_stop(), procfs_debug_inferior(), ptid_build(), push_target(), procinfo::saved_entryset, procinfo::saved_exitset, procinfo::saved_fltset, procinfo::saved_sighold, procinfo::saved_sigset, signals, START_INFERIOR_TRAPS_EXPECTED, startup_inferior(), target_is_pushed(), and thread_change_ptid().
Referenced by procfs_create_inferior().
|
static |
Definition at line 4831 of file procfs.c.
References gdbarch_have_nonsteppable_watchpoint(), inferior_ptid, procfs_set_watchpoint(), target_gdbarch(), and target_have_steppable_watchpoint.
Referenced by procfs_use_watchpoints().
|
static |
Definition at line 4267 of file procfs.c.
References find_procinfo(), inferior_ptid, null_ptid, ptid_equal(), ptid_get_pid(), target_mourn_inferior(), and unconditionally_kill_inferior().
Referenced by procfs_target().
|
static |
|
static |
Definition at line 4283 of file procfs.c.
References destroy_procinfo(), find_procinfo(), generic_mourn_inferior(), inf_child_maybe_unpush_target(), inferior_ptid, null_ptid, ptid_equal(), and ptid_get_pid().
Referenced by procfs_target().
Definition at line 4636 of file procfs.c.
References add_thread(), in_thread_list(), is_exited(), procinfo::pid, ptid_build(), and procinfo::tid.
Referenced by procfs_update_thread_list().
|
static |
Definition at line 4171 of file procfs.c.
References find_procinfo_or_die(), gdb_prdelset, gdb_signal_from_host(), inferior_ptid, proc_error(), proc_set_traced_signals(), ptid_get_pid(), and signals.
Referenced by procfs_target().
|
static |
Definition at line 4694 of file procfs.c.
References ptid_get_lwp(), and ptid_get_pid().
Referenced by procfs_target().
|
static |
Definition at line 4862 of file procfs.c.
Referenced by procfs_use_watchpoints().
|
static |
Definition at line 4854 of file procfs.c.
References inferior_ptid, and procfs_set_watchpoint().
Referenced by procfs_use_watchpoints().
|
static |
Definition at line 4089 of file procfs.c.
References _, find_procinfo(), find_procinfo_or_die(), gdb_signal_to_host(), procinfo::ignore_next_sigstop, inferior_ptid, invalidate_cache(), proc_error(), proc_iterate_over_threads(), proc_run_process(), ptid_get_lwp(), ptid_get_pid(), procinfo::tid, and warning().
Referenced by procfs_target().
|
static |
Definition at line 4416 of file procfs.c.
References _, create_procinfo(), procinfo::ctl_fd, FD_CTL, gdb_flush(), gdb_praddsysset, gdb_premptysysset, gdb_stderr, open_procinfo_files(), perror_with_name(), proc_set_traced_sysexit(), proc_unset_inherit_on_fork(), proc_unset_run_on_last_close(), proc_warn(), and sysset_t_alloc().
Referenced by procfs_create_inferior().
|
static |
Definition at line 4709 of file procfs.c.
References AFTER_WATCHFLAG, EXEC_WATCHFLAG, find_procinfo_or_die(), hw_access, hw_execute, hw_read, hw_write, inferior_ptid, proc_error(), proc_set_watchpoint(), ptid_get_pid(), READ_WATCHFLAG, and WRITE_WATCHFLAG.
Referenced by procfs_insert_watchpoint(), and procfs_remove_watchpoint().
|
static |
Definition at line 4208 of file procfs.c.
References inferior_process_group().
Referenced by procfs_target().
|
static |
Definition at line 4792 of file procfs.c.
References find_procinfo_or_die(), inferior_ptid, proc_flags(), proc_what(), proc_why(), and ptid_get_pid().
Referenced by procfs_use_watchpoints().
|
static |
Definition at line 4822 of file procfs.c.
References find_procinfo_or_die(), inferior_ptid, proc_watchpoint_address(), and ptid_get_pid().
Referenced by procfs_use_watchpoints().
|
static |
Definition at line 3262 of file procfs.c.
References _, error(), fill_fpregset(), fill_gregset(), find_procinfo_or_die(), gdbarch_fp0_regnum(), gdbarch_pc_regnum(), gdbarch_sp_regnum(), get_regcache_arch(), inferior_ptid, pid, proc_error(), proc_get_fpregs(), proc_get_gregs(), proc_set_fpregs(), proc_set_gregs(), ptid_get_lwp(), ptid_get_pid(), and target_pid_to_str().
Referenced by procfs_target().
struct target_ops* procfs_target | ( | void | ) |
Definition at line 182 of file procfs.c.
References inf_child_target(), OPS_MAGIC, proc_find_memory_regions(), procfs_attach(), procfs_create_inferior(), procfs_detach(), procfs_fetch_registers(), procfs_files_info(), procfs_info_proc(), procfs_kill_inferior(), procfs_make_note_section(), procfs_mourn_inferior(), procfs_pass_signals(), procfs_pid_to_str(), procfs_resume(), procfs_stop(), procfs_store_registers(), procfs_thread_alive(), procfs_update_thread_list(), procfs_wait(), procfs_xfer_partial, tc_schedlock, target_ops::to_attach, target_ops::to_auxv_parse, target_ops::to_create_inferior, target_ops::to_detach, target_ops::to_fetch_registers, target_ops::to_files_info, target_ops::to_find_memory_regions, target_ops::to_has_thread_control, target_ops::to_info_proc, target_ops::to_kill, target_ops::to_magic, target_ops::to_make_corefile_notes, 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_store_registers, target_ops::to_thread_alive, target_ops::to_update_thread_list, target_ops::to_wait, and target_ops::to_xfer_partial.
Referenced by _initialize_amd64_sol2_nat(), and _initialize_sparc_sol2_nat().
|
static |
Definition at line 4667 of file procfs.c.
References destroy_procinfo(), find_procinfo(), proc_get_status(), ptid_get_lwp(), and ptid_get_pid().
Referenced by procfs_target().
|
static |
Definition at line 4650 of file procfs.c.
References find_procinfo_or_die(), inferior_ptid, proc_iterate_over_threads(), proc_update_threads(), procfs_notice_thread(), prune_threads(), and ptid_get_pid().
Referenced by procfs_target().
void procfs_use_watchpoints | ( | struct target_ops * | t | ) |
Definition at line 4874 of file procfs.c.
References procfs_can_use_hw_breakpoint(), procfs_insert_watchpoint(), procfs_region_ok_for_hw_watchpoint(), procfs_remove_watchpoint(), procfs_stopped_by_watchpoint(), procfs_stopped_data_address(), target_ops::to_can_use_hw_breakpoint, target_ops::to_insert_watchpoint, target_ops::to_region_ok_for_hw_watchpoint, target_ops::to_remove_watchpoint, target_ops::to_stopped_by_watchpoint, and target_ops::to_stopped_data_address.
Referenced by _initialize_amd64_sol2_nat(), and _initialize_sparc_sol2_nat().
|
static |
Definition at line 3536 of file procfs.c.
References _, add_thread(), inferior::attach_flag, create_procinfo(), delete_thread(), error(), find_inferior_pid(), find_procinfo(), find_procinfo_or_die(), FLAG_RESET, flags, procinfo::fpregs_valid, procinfo::gregs_valid, in_thread_list(), arm-linux::inf, inferior_ptid, info_verbose, target_waitstatus::kind, procinfo::pid, pid_to_ptid(), print_thread_events, printf_filtered(), printf_unfiltered(), proc_error(), proc_flags(), proc_get_current_thread(), proc_nsysarg(), proc_prettyprint_flags(), proc_prettyprint_syscall(), proc_prettyprint_why(), proc_run_process(), proc_sysargs(), proc_trace_syscalls_1(), proc_wait_for_stop(), proc_what(), proc_why(), ptid_build(), ptid_equal(), ptid_get_lwp(), ptid_get_pid(), target_waitstatus::sig, procinfo::status_valid, store_waitstatus(), syscall_is_exec(), syscall_is_exit(), syscall_is_lwp_create(), syscall_is_lwp_exit(), target_pid_to_str(), target_resume(), TARGET_WAITKIND_SPURIOUS, TARGET_WAITKIND_STOPPED, and target_waitstatus::value.
Referenced by procfs_target().
|
static |
Definition at line 3967 of file procfs.c.
References procinfo::as_fd, FD_AS, find_procinfo_or_die(), inferior_ptid, open_procinfo_files(), proc_warn(), PROCFS_NOTE, ptid_get_pid(), read(), SEEK_SET, TARGET_XFER_E_IO, and TARGET_XFER_OK.
Referenced by procfs_xfer_partial().
|
static |
Definition at line 3940 of file procfs.c.
References target_ops::beneath, memory_xfer_auxv, procfs_xfer_memory(), TARGET_OBJECT_AUXV, TARGET_OBJECT_MEMORY, and target_ops::to_xfer_partial.
Definition at line 3333 of file procfs.c.
Referenced by procfs_wait().
Definition at line 3319 of file procfs.c.
Referenced by procfs_wait().
Definition at line 3357 of file procfs.c.
Referenced by procfs_wait().
Definition at line 3305 of file procfs.c.
Referenced by procfs_wait().
|
static |
Definition at line 843 of file procfs.c.
References size, sysset_t_size(), and xmalloc().
Referenced by create_procinfo(), proc_get_traced_sysentry(), proc_get_traced_sysexit(), procfs_debug_inferior(), and procfs_set_exec_trap().
Definition at line 829 of file procfs.c.
Referenced by proc_get_traced_sysentry(), proc_get_traced_sysexit(), and sysset_t_alloc().
|
static |
Definition at line 4219 of file procfs.c.
References procinfo::ctl_fd, destroy_procinfo(), procinfo::pid, proc_error(), proc_kill(), proc_parent_pid(), and status.
Referenced by procfs_kill_inferior().
|
static |
Definition at line 133 of file procfs.c.
Referenced by procfs_target().
|
static |
Definition at line 441 of file procfs.c.
Referenced by create_procinfo().