diff options
| author | Peter Wemm <peter@FreeBSD.org> | 2004-01-28 23:54:31 +0000 |
|---|---|---|
| committer | Peter Wemm <peter@FreeBSD.org> | 2004-01-28 23:54:31 +0000 |
| commit | d957532a87a1d41aed4f52836faf6539d3133840 (patch) | |
| tree | 1115639665e30511d19194342ed44ec6f676c7ed /sys | |
| parent | 1182b177ff274b0ec0b6b8831ad62c150d588495 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/amd64/include/pcb.h | 11 | ||||
| -rw-r--r-- | sys/amd64/include/reg.h | 15 |
2 files changed, 23 insertions, 3 deletions
diff --git a/sys/amd64/include/pcb.h b/sys/amd64/include/pcb.h index 1d909cdf33e33..311c47326ce34 100644 --- a/sys/amd64/include/pcb.h +++ b/sys/amd64/include/pcb.h @@ -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 */ }; diff --git a/sys/amd64/include/reg.h b/sys/amd64/include/reg.h index 73b52d7b1aa67..0bbf808c4ab27 100644 --- a/sys/amd64/include/reg.h +++ b/sys/amd64/include/reg.h @@ -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. |
