Add dbreg struct definitions for /proc/*/dbregs and a place to store the

registers in the pcb
This commit is contained in:
peter 2004-01-28 23:54:31 +00:00
parent 9ba1ee132d
commit 5e45c69f41
2 changed files with 23 additions and 3 deletions

View File

@ -64,11 +64,18 @@ struct pcb {
u_int32_t pcb_es;
u_int32_t pcb_fs;
u_int32_t pcb_gs;
u_int64_t pcb_dr0;
u_int64_t pcb_dr1;
u_int64_t pcb_dr2;
u_int64_t pcb_dr3;
u_int64_t pcb_dr6;
u_int64_t pcb_dr7;
struct savefpu pcb_save;
u_long pcb_flags;
#define PCB_FPUINITDONE 0x01 /* fpu state is initialized */
#define PCB_FULLCTX 0x02 /* full context restore on sysret */
#define PCB_DBREGS 0x02 /* process using debug registers */
#define PCB_FPUINITDONE 0x08 /* fpu state is initialized */
#define PCB_FULLCTX 0x80 /* full context restore on sysret */
caddr_t pcb_onfault; /* copyin/out fault recovery */
};

View File

@ -84,10 +84,23 @@ struct fpreg {
unsigned long fpr_spare[12];
};
/*
* Register set accessible via /proc/$pid/dbregs.
*/
struct dbreg {
unsigned long grrr;
unsigned long dr[16]; /* debug registers */
/* Index 0-3: debug address registers */
/* Index 4-5: reserved */
/* Index 6: debug status */
/* Index 7: debug control */
/* Index 8-15: reserved */
};
#define DBREG_DR7_EXEC 0x00 /* break on execute */
#define DBREG_DR7_WRONLY 0x01 /* break on write */
#define DBREG_DR7_RDWR 0x03 /* break on read or write */
#define DBREG_DRX(d,x) ((d)->dr[(x)]) /* reference dr0 - dr15 by
register number */
#ifdef _KERNEL
/*
* XXX these interfaces are MI, so they should be declared in a MI place.