GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Macros | Functions | Variables
bsd-kvm.c File Reference
#include "defs.h"
#include "cli/cli-cmds.h"
#include "command.h"
#include "filenames.h"
#include "frame.h"
#include "regcache.h"
#include "target.h"
#include "process-stratum-target.h"
#include "value.h"
#include "gdbcore.h"
#include "inferior.h"
#include "gdbthread.h"
#include "gdbsupport/pathstuff.h"
#include "gdbsupport/gdb_tilde_expand.h"
#include <fcntl.h>
#include <kvm.h>
#include <paths.h>
#include "readline/readline.h"
#include <sys/param.h>
#include <sys/proc.h>
#include "bsd-kvm.h"

Go to the source code of this file.

Classes

class  bsd_kvm_target
 

Macros

#define _KMEMUSER
 

Functions

static void bsd_kvm_target_open (const char *arg, int from_tty)
 
static LONGEST bsd_kvm_xfer_memory (CORE_ADDR addr, ULONGEST len, gdb_byte *readbuf, const gdb_byte *writebuf)
 
static int bsd_kvm_fetch_pcb (struct regcache *regcache, struct pcb *paddr)
 
static void bsd_kvm_cmd (const char *arg, int fromtty)
 
static void bsd_kvm_proc_cmd (const char *arg, int fromtty)
 
static void bsd_kvm_pcb_cmd (const char *arg, int fromtty)
 
void bsd_kvm_add_target (int(*supply_pcb)(struct regcache *, struct pcb *))
 

Variables

static std::string bsd_kvm_corefile
 
static kvm_t * core_kd
 
static struct pcb * bsd_kvm_paddr
 
static int(* bsd_kvm_supply_pcb )(struct regcache *regcache, struct pcb *pcb)
 
static ptid_t bsd_kvm_ptid
 
static const target_info bsd_kvm_target_info
 
static bsd_kvm_target bsd_kvm_ops
 
struct cmd_list_elementbsd_kvm_cmdlist
 

Macro Definition Documentation

◆ _KMEMUSER

#define _KMEMUSER

Definition at line 20 of file bsd-kvm.c.

Function Documentation

◆ bsd_kvm_add_target()

void bsd_kvm_add_target ( int(*)(struct regcache *, struct pcb *) supply_pcb)

◆ bsd_kvm_cmd()

static void bsd_kvm_cmd ( const char * arg,
int fromtty )
static

Definition at line 309 of file bsd-kvm.c.

Referenced by bsd_kvm_add_target().

◆ bsd_kvm_fetch_pcb()

static int bsd_kvm_fetch_pcb ( struct regcache * regcache,
struct pcb * paddr )
static

Definition at line 214 of file bsd-kvm.c.

References bsd_kvm_supply_pcb, and core_kd.

Referenced by bsd_kvm_target::fetch_registers().

◆ bsd_kvm_pcb_cmd()

static void bsd_kvm_pcb_cmd ( const char * arg,
int fromtty )
static

◆ bsd_kvm_proc_cmd()

static void bsd_kvm_proc_cmd ( const char * arg,
int fromtty )
static

◆ bsd_kvm_target_open()

static void bsd_kvm_target_open ( const char * arg,
int from_tty )
static

◆ bsd_kvm_xfer_memory()

static LONGEST bsd_kvm_xfer_memory ( CORE_ADDR addr,
ULONGEST len,
gdb_byte * readbuf,
const gdb_byte * writebuf )
static

Definition at line 161 of file bsd-kvm.c.

References core_kd.

Referenced by bsd_kvm_target::xfer_partial().

Variable Documentation

◆ bsd_kvm_cmdlist

struct cmd_list_element* bsd_kvm_cmdlist

Definition at line 306 of file bsd-kvm.c.

Referenced by bsd_kvm_add_target().

◆ bsd_kvm_corefile

std::string bsd_kvm_corefile
static

◆ bsd_kvm_ops

bsd_kvm_target bsd_kvm_ops
static

Definition at line 106 of file bsd-kvm.c.

Referenced by bsd_kvm_target_open().

◆ bsd_kvm_paddr

struct pcb* bsd_kvm_paddr
static

Definition at line 58 of file bsd-kvm.c.

Referenced by bsd_kvm_pcb_cmd(), bsd_kvm_proc_cmd(), and bsd_kvm_target::fetch_registers().

◆ bsd_kvm_ptid

ptid_t bsd_kvm_ptid
static

Definition at line 67 of file bsd-kvm.c.

Referenced by bsd_kvm_add_target(), and bsd_kvm_target_open().

◆ bsd_kvm_supply_pcb

int(* bsd_kvm_supply_pcb) (struct regcache *regcache, struct pcb *pcb) ( struct regcache * regcache,
struct pcb * pcb )
static

Definition at line 62 of file bsd-kvm.c.

Referenced by bsd_kvm_add_target(), and bsd_kvm_fetch_pcb().

◆ bsd_kvm_target_info

const target_info bsd_kvm_target_info
static
Initial value:
= {
"kvm",
N_("Kernel memory interface"),
N_("Use a kernel virtual memory image as a target.\n\
Optionally specify the filename of a core dump.")
}

Definition at line 71 of file bsd-kvm.c.

Referenced by bsd_kvm_add_target(), and bsd_kvm_target::info().

◆ core_kd

kvm_t* core_kd
static