FreeBSD kernel /amd64 XEN device code
debug.c File Reference
#include <sys/cdefs.h>
#include "opt_stack.h"
#include "opt_ddb.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/bus.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/module.h>
#include <sys/mutex.h>
#include <sys/pcpu.h>
#include <sys/smp.h>
#include <sys/stack.h>
#include <sys/sbuf.h>
#include <xen/xen-os.h>
#include <xen/xen_intr.h>
#include <xen/hypervisor.h>
Include dependency graph for debug.c:

Go to the source code of this file.

Functions

 __FBSDID ("$FreeBSD$")
 
 DPCPU_DEFINE (xen_intr_handle_t, xendebug_handler)
 
static int xendebug_drain (void *arg, const char *str, int len)
 
void stack_capture (struct stack *st, register_t rbp)
 
static int xendebug_filter (void *arg __unused)
 
static void xendebug_identify (driver_t *driver, device_t parent)
 
static int xendebug_probe (device_t dev)
 
static int xendebug_attach (device_t dev)
 
 DRIVER_MODULE (xendebug, xenpv, xendebug_driver, xendebug_devclass, 0, 0)
 
 MODULE_DEPEND (xendebug, xenpv, 1, 1, 1)
 

Variables

static struct mtx lock
 
static struct sbuf * buf
 
static device_method_t xendebug_methods []
 
static driver_t xendebug_driver
 
devclass_t xendebug_devclass
 

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ DPCPU_DEFINE()

DPCPU_DEFINE ( xen_intr_handle_t  ,
xendebug_handler   
)

◆ DRIVER_MODULE()

DRIVER_MODULE ( xendebug  ,
xenpv  ,
xendebug_driver  ,
xendebug_devclass  ,
,
 
)

◆ MODULE_DEPEND()

MODULE_DEPEND ( xendebug  ,
xenpv  ,
,
,
 
)

◆ stack_capture()

void stack_capture ( struct stack *  st,
register_t  rbp 
)

◆ xendebug_attach()

static int xendebug_attach ( device_t  dev)
static

Definition at line 114 of file debug.c.

References buf, lock, xendebug_drain(), and xendebug_filter().

Here is the call graph for this function:

◆ xendebug_drain()

static int xendebug_drain ( void *  arg,
const char *  str,
int  len 
)
static

Definition at line 61 of file debug.c.

Referenced by xendebug_attach().

Here is the caller graph for this function:

◆ xendebug_filter()

static int xendebug_filter ( void *arg  __unused)
static

Definition at line 72 of file debug.c.

References buf, lock, and xc_printf().

Referenced by xendebug_attach().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xendebug_identify()

static void xendebug_identify ( driver_t *  driver,
device_t  parent 
)
static

Definition at line 92 of file debug.c.

◆ xendebug_probe()

static int xendebug_probe ( device_t  dev)
static

Definition at line 106 of file debug.c.

Variable Documentation

◆ buf

struct sbuf* buf
static

◆ lock

struct mtx lock
static

Definition at line 57 of file debug.c.

Referenced by xendebug_attach(), and xendebug_filter().

◆ xendebug_devclass

devclass_t xendebug_devclass

Definition at line 154 of file debug.c.

◆ xendebug_driver

driver_t xendebug_driver
static
Initial value:
= {
"debug",
0,
}
static device_method_t xendebug_methods[]
Definition: debug.c:140

Definition at line 148 of file debug.c.

◆ xendebug_methods

device_method_t xendebug_methods[]
static
Initial value:
= {
DEVMETHOD(device_identify, xendebug_identify),
DEVMETHOD(device_probe, xendebug_probe),
DEVMETHOD(device_attach, xendebug_attach),
DEVMETHOD_END
}
static int xendebug_probe(device_t dev)
Definition: debug.c:106
static void xendebug_identify(driver_t *driver, device_t parent)
Definition: debug.c:92
static int xendebug_attach(device_t dev)
Definition: debug.c:114

Definition at line 140 of file debug.c.