GDB (xrefs)
Functions | Variables
/tmp/gdb-7.10/gdb/bsd-kvm.c File Reference
#include "defs.h"
#include "cli/cli-cmds.h"
#include "command.h"
#include "frame.h"
#include "regcache.h"
#include "target.h"
#include "value.h"
#include "gdbcore.h"
#include "gdbthread.h"
#include <fcntl.h>
#include <kvm.h>
#include <nlist.h>
#include <paths.h>
#include "readline/readline.h"
#include <sys/param.h>
#include <sys/proc.h>
#include <sys/user.h>
#include "bsd-kvm.h"

Go to the source code of this file.

Functions

static void bsd_kvm_open (const char *arg, int from_tty)
 
static void bsd_kvm_close (struct target_ops *self)
 
static LONGEST bsd_kvm_xfer_memory (CORE_ADDR addr, ULONGEST len, gdb_byte *readbuf, const gdb_byte *writebuf)
 
static enum target_xfer_status bsd_kvm_xfer_partial (struct target_ops *ops, enum target_object object, const char *annex, gdb_byte *readbuf, const gdb_byte *writebuf, ULONGEST offset, ULONGEST len, ULONGEST *xfered_len)
 
static void bsd_kvm_files_info (struct target_ops *ops)
 
static int bsd_kvm_fetch_pcb (struct regcache *regcache, struct pcb *paddr)
 
static void bsd_kvm_fetch_registers (struct target_ops *ops, struct regcache *regcache, int regnum)
 
static void bsd_kvm_cmd (char *arg, int fromtty)
 
static void bsd_kvm_proc_cmd (char *arg, int fromtty)
 
static void bsd_kvm_pcb_cmd (char *arg, int fromtty)
 
static int bsd_kvm_thread_alive (struct target_ops *ops, ptid_t ptid)
 
static char * bsd_kvm_pid_to_str (struct target_ops *ops, ptid_t ptid)
 
static int bsd_kvm_return_one (struct target_ops *ops)
 
void bsd_kvm_add_target (int(*supply_pcb)(struct regcache *, struct pcb *))
 

Variables

static const char * 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 struct target_ops bsd_kvm_ops
 
static ptid_t bsd_kvm_ptid
 
struct cmd_list_elementbsd_kvm_cmdlist
 

Function Documentation

void bsd_kvm_add_target ( int(*)(struct regcache *, struct pcb *)  supply_pcb)
static void bsd_kvm_close ( struct target_ops self)
static

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

References core_kd, delete_thread_silent(), inferior_ptid, null_ptid, and warning().

Referenced by bsd_kvm_add_target().

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

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

Referenced by bsd_kvm_add_target().

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

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

References bsd_kvm_supply_pcb, core_kd, error(), and gdb_assert.

Referenced by bsd_kvm_fetch_registers().

static void bsd_kvm_fetch_registers ( struct target_ops ops,
struct regcache regcache,
int  regnum 
)
static

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

References _, bsd_kvm_fetch_pcb(), bsd_kvm_paddr, core_kd, and error().

Referenced by bsd_kvm_add_target().

static void bsd_kvm_files_info ( struct target_ops ops)
static

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

References _, bsd_kvm_corefile, and printf_filtered().

Referenced by bsd_kvm_add_target().

static void bsd_kvm_open ( const char *  arg,
int  from_tty 
)
static
static void bsd_kvm_pcb_cmd ( char *  arg,
int  fromtty 
)
static
static char* bsd_kvm_pid_to_str ( struct target_ops ops,
ptid_t  ptid 
)
static

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

References xsnprintf().

Referenced by bsd_kvm_add_target().

static void bsd_kvm_proc_cmd ( char *  arg,
int  fromtty 
)
static
static int bsd_kvm_return_one ( struct target_ops ops)
static

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

Referenced by bsd_kvm_add_target().

static int bsd_kvm_thread_alive ( struct target_ops ops,
ptid_t  ptid 
)
static

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

Referenced by bsd_kvm_add_target().

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

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

References core_kd, and len.

Referenced by bsd_kvm_xfer_partial().

static enum target_xfer_status bsd_kvm_xfer_partial ( struct target_ops ops,
enum target_object  object,
const char *  annex,
gdb_byte readbuf,
const gdb_byte writebuf,
ULONGEST  offset,
ULONGEST  len,
ULONGEST xfered_len 
)
static

Variable Documentation

struct cmd_list_element* bsd_kvm_cmdlist

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

const char* bsd_kvm_corefile
static

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

Referenced by bsd_kvm_files_info(), and bsd_kvm_open().

struct target_ops bsd_kvm_ops
static

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

Referenced by bsd_kvm_add_target(), and bsd_kvm_open().

struct pcb* bsd_kvm_paddr
static

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

Referenced by bsd_kvm_fetch_registers(), bsd_kvm_pcb_cmd(), and bsd_kvm_proc_cmd().

ptid_t bsd_kvm_ptid
static

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

Referenced by bsd_kvm_open().

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

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

Referenced by bsd_kvm_add_target(), and bsd_kvm_fetch_pcb().

kvm_t* core_kd
static