GDB (xrefs)
Loading...
Searching...
No Matches
Macros | Functions | Variables
fbsd-nat.c File Reference
#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"
#include <list>

Go to the source code of this file.

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__)
 

Functions

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)
 
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
 

Macro Definition Documentation

◆ fbsd_lwp_debug_printf

#define fbsd_lwp_debug_printf (   fmt,
  ... 
)     debug_prefixed_printf_cond (debug_fbsd_lwp, "fbsd-lwp", fmt, ##__VA_ARGS__)

Definition at line 736 of file fbsd-nat.c.

◆ fbsd_nat_debug_printf

#define fbsd_nat_debug_printf (   fmt,
  ... 
)     debug_prefixed_printf_cond (debug_fbsd_nat, "fbsd-nat", fmt, ##__VA_ARGS__)

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

◆ PT_GETREGSET

#define PT_GETREGSET   42 /* Get a target register set */

Definition at line 53 of file fbsd-nat.c.

◆ PT_SETREGSET

#define PT_SETREGSET   43 /* Set a target register set */

Definition at line 54 of file fbsd-nat.c.

Function Documentation

◆ _initialize_fbsd_nat()

void _initialize_fbsd_nat ( )

◆ fbsd_add_threads()

static void fbsd_add_threads ( fbsd_nat_target target,
pid_t  pid 
)
static

◆ fbsd_convert_siginfo()

static void fbsd_convert_siginfo ( siginfo_t *  si)
static

Definition at line 510 of file fbsd-nat.c.

References gdbarch_long_bit(), get_current_frame(), and get_frame_arch().

Referenced by fbsd_nat_target::xfer_partial().

◆ fbsd_enable_proc_events()

static void fbsd_enable_proc_events ( pid_t  pid)
static

◆ fbsd_fetch_cmdline()

static gdb::unique_xmalloc_ptr< char > fbsd_fetch_cmdline ( pid_t  pid)
static

Definition at line 136 of file fbsd-nat.c.

References pid, and xmalloc().

Referenced by fbsd_nat_target::info_proc().

◆ fbsd_fetch_kinfo_proc()

static bool fbsd_fetch_kinfo_proc ( pid_t  pid,
struct kinfo_proc *  kp 
)
static

Definition at line 170 of file fbsd-nat.c.

References pid.

Referenced by fbsd_nat_target::info_proc(), and fbsd_nat_target::wait_1().

◆ fbsd_nat_get_siginfo()

bool fbsd_nat_get_siginfo ( ptid_t  ptid,
siginfo_t *  siginfo 
)

Definition at line 1857 of file fbsd-nat.c.

References get_ptrace_pid(), pid, PL_FLAG_SI, and ptrace.

◆ fbsd_siginfo_size()

static size_t fbsd_siginfo_size ( )
static

Definition at line 493 of file fbsd-nat.c.

References gdbarch_long_bit(), get_current_frame(), and get_frame_arch().

Referenced by fbsd_nat_target::xfer_partial().

◆ handle_target_event()

static void handle_target_event ( int  error,
gdb_client_data  client_data 
)
static

Definition at line 966 of file fbsd-nat.c.

References INF_REG_EVENT, and inferior_event_handler().

Referenced by fbsd_nat_target::async(), and linux_nat_target::async().

◆ show_fbsd_lwp_debug()

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

Definition at line 722 of file fbsd-nat.c.

References gdb_printf().

Referenced by _initialize_fbsd_nat().

◆ show_fbsd_nat_debug()

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

Definition at line 729 of file fbsd-nat.c.

References gdb_printf().

Referenced by _initialize_fbsd_nat().

◆ sigchld_handler()

static void sigchld_handler ( int  signo)
static

Definition at line 954 of file fbsd-nat.c.

References inf_ptrace_target::async_file_mark_if_open().

Referenced by _initialize_fbsd_nat().

Variable Documentation

◆ debug_fbsd_lwp

bool debug_fbsd_lwp
static

Definition at line 718 of file fbsd-nat.c.

Referenced by _initialize_fbsd_nat().

◆ debug_fbsd_nat

bool debug_fbsd_nat
static

Definition at line 719 of file fbsd-nat.c.

Referenced by _initialize_fbsd_nat(), and fbsd_nat_target::wait_1().