GDB (xrefs)
|
#include "defs.h"
#include "gdbsupport/block-signals.h"
#include "gdbsupport/byte-vector.h"
#include "gdbsupport/event-loop.h"
#include "gdbcore.h"
#include "inferior.h"
#include "regcache.h"
#include "regset.h"
#include "gdbarch.h"
#include "gdbcmd.h"
#include "gdbthread.h"
#include "gdbsupport/buildargv.h"
#include "gdbsupport/gdb_wait.h"
#include "inf-loop.h"
#include "inf-ptrace.h"
#include <sys/types.h>
#include <sys/procfs.h>
#include <sys/ptrace.h>
#include <sys/signal.h>
#include <sys/sysctl.h>
#include <sys/user.h>
#include <libutil.h>
#include "elf-bfd.h"
#include "fbsd-nat.h"
#include "fbsd-tdep.h"
Go to the source code of this file.
Classes | |
struct | fbsd_inferior |
Macros | |
#define | PT_GETREGSET 42 /* Get a target register set */ |
#define | PT_SETREGSET 43 /* Set a target register set */ |
#define | fbsd_lwp_debug_printf(fmt, ...) debug_prefixed_printf_cond (debug_fbsd_lwp, "fbsd-lwp", fmt, ##__VA_ARGS__) |
#define | fbsd_nat_debug_printf(fmt, ...) debug_prefixed_printf_cond (debug_fbsd_nat, "fbsd-nat", fmt, ##__VA_ARGS__) |
#define | fbsd_nat_debug_start_end(fmt, ...) scoped_debug_start_end (debug_fbsd_nat, "fbsd-nat", fmt, ##__VA_ARGS__) |
Typedefs | |
typedef bool | ptrace_event_ftype(const struct ptrace_lwpinfo &pl) |
Functions | |
static fbsd_inferior * | get_fbsd_inferior (inferior *inf) |
static gdb::unique_xmalloc_ptr< char > | fbsd_fetch_cmdline (pid_t pid) |
static bool | fbsd_fetch_kinfo_proc (pid_t pid, struct kinfo_proc *kp) |
static size_t | fbsd_siginfo_size () |
static void | fbsd_convert_siginfo (siginfo_t *si) |
static void | show_fbsd_lwp_debug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) |
static void | show_fbsd_nat_debug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) |
static void | fbsd_enable_proc_events (pid_t pid) |
static void | fbsd_add_threads (fbsd_nat_target *target, pid_t pid) |
static void | sigchld_handler (int signo) |
static void | handle_target_event (int error, gdb_client_data client_data) |
static bool | iterate_other_ptrace_events (pid_t pid, gdb::function_view< ptrace_event_ftype > callback) |
static bool | pending_ptrace_events (inferior *inf) |
bool | fbsd_nat_get_siginfo (ptid_t ptid, siginfo_t *siginfo) |
void | _initialize_fbsd_nat () |
Variables | |
static bool | debug_fbsd_lwp |
static bool | debug_fbsd_nat |
#define fbsd_lwp_debug_printf | ( | fmt, | |
... ) debug_prefixed_printf_cond (debug_fbsd_lwp, "fbsd-lwp", fmt, ##__VA_ARGS__) |
Definition at line 799 of file fbsd-nat.c.
Referenced by fbsd_add_threads(), and fbsd_nat_target::wait_1().
#define fbsd_nat_debug_printf | ( | fmt, | |
... ) debug_prefixed_printf_cond (debug_fbsd_nat, "fbsd-nat", fmt, ##__VA_ARGS__) |
Definition at line 802 of file fbsd-nat.c.
Referenced by fbsd_nat_target::detach(), fbsd_nat_target::detach_fork_children(), fbsd_nat_target::detach_fork_children(), fbsd_nat_target::resume_one_process(), fbsd_nat_target::stop_process(), fbsd_nat_target::wait(), and fbsd_nat_target::wait_1().
#define fbsd_nat_debug_start_end | ( | fmt, | |
... ) scoped_debug_start_end (debug_fbsd_nat, "fbsd-nat", fmt, ##__VA_ARGS__) |
Definition at line 805 of file fbsd-nat.c.
Referenced by fbsd_nat_target::detach(), and fbsd_nat_target::resume().
#define PT_GETREGSET 42 /* Get a target register set */ |
Definition at line 51 of file fbsd-nat.c.
Referenced by fbsd_nat_target::fetch_regset(), fbsd_nat_target::have_regset(), and fbsd_nat_target::store_regset().
#define PT_SETREGSET 43 /* Set a target register set */ |
Definition at line 52 of file fbsd-nat.c.
Referenced by fbsd_nat_target::store_regset().
typedef bool ptrace_event_ftype(const struct ptrace_lwpinfo &pl) |
Definition at line 1930 of file fbsd-nat.c.
void _initialize_fbsd_nat | ( | ) |
Definition at line 2475 of file fbsd-nat.c.
References add_setshow_boolean_cmd(), class_maintenance, debug_fbsd_lwp, debug_fbsd_nat, setdebuglist, show_fbsd_lwp_debug(), show_fbsd_nat_debug(), showdebuglist, and sigchld_handler().
|
static |
Definition at line 955 of file fbsd-nat.c.
References add_thread(), fbsd_lwp_debug_printf, find_inferior_ptid(), get_fbsd_inferior(), in_thread_list(), fbsd_inferior::num_lwps, pid, and ptrace.
Referenced by fbsd_nat_target::post_attach(), and fbsd_nat_target::update_thread_list().
|
static |
Definition at line 573 of file fbsd-nat.c.
References gdbarch_long_bit(), get_current_frame(), and get_frame_arch().
Referenced by fbsd_nat_target::xfer_partial().
|
static |
Definition at line 921 of file fbsd-nat.c.
References pid, ptrace, and PTRACE_TYPE_ARG3.
Referenced by fbsd_nat_target::post_attach(), fbsd_nat_target::post_startup_inferior(), and fbsd_nat_target::wait_1().
|
static |
Definition at line 199 of file fbsd-nat.c.
References pid, and xmalloc().
Referenced by fbsd_nat_target::info_proc().
|
static |
Definition at line 233 of file fbsd-nat.c.
References pid.
Referenced by fbsd_nat_target::info_proc(), and fbsd_nat_target::wait_1().
bool fbsd_nat_get_siginfo | ( | ptid_t | ptid, |
siginfo_t * | siginfo ) |
Definition at line 2460 of file fbsd-nat.c.
References get_ptrace_pid(), pid, PL_FLAG_SI, and ptrace.
|
static |
Definition at line 556 of file fbsd-nat.c.
References gdbarch_long_bit(), get_current_frame(), and get_frame_arch().
Referenced by fbsd_nat_target::xfer_partial().
|
inlinestatic |
Definition at line 74 of file fbsd-nat.c.
Referenced by fbsd_nat_target::detach(), fbsd_nat_target::detach_fork_children(), fbsd_add_threads(), fbsd_nat_target::resume_one_process(), fbsd_nat_target::stop_process(), fbsd_nat_target::take_pending_event(), fbsd_nat_target::wait(), and fbsd_nat_target::wait_1().
|
static |
Definition at line 1046 of file fbsd-nat.c.
References INF_REG_EVENT, and inferior_event_handler().
|
static |
Definition at line 1933 of file fbsd-nat.c.
Referenced by fbsd_nat_target::kill(), and pending_ptrace_events().
|
static |
Definition at line 1972 of file fbsd-nat.c.
References iterate_other_ptrace_events(), inf::pid, and PL_FLAG_SI.
Referenced by fbsd_nat_target::detach().
|
static |
Definition at line 785 of file fbsd-nat.c.
References gdb_printf().
Referenced by _initialize_fbsd_nat().
|
static |
Definition at line 792 of file fbsd-nat.c.
References gdb_printf().
Referenced by _initialize_fbsd_nat().
|
static |
Definition at line 1034 of file fbsd-nat.c.
References inf_ptrace_target::async_file_mark_if_open().
Referenced by _initialize_fbsd_nat().
|
static |
Definition at line 781 of file fbsd-nat.c.
Referenced by _initialize_fbsd_nat().
|
static |
Definition at line 782 of file fbsd-nat.c.
Referenced by _initialize_fbsd_nat(), and fbsd_nat_target::wait_1().