diff options
author | jlemon <jlemon@FreeBSD.org> | 1999-07-09 04:16:00 +0000 |
---|---|---|
committer | jlemon <jlemon@FreeBSD.org> | 1999-07-09 04:16:00 +0000 |
commit | fb9048b07bd1c35bc75d6a5619a8a66c0cf40b4f (patch) | |
tree | 5035c891109a8a7303adbff335bde82a04b1c903 /sys/miscfs | |
parent | 8402d41bdeafb13d775baf552ba6f1faba0aadca (diff) | |
download | FreeBSD-src-fb9048b07bd1c35bc75d6a5619a8a66c0cf40b4f.zip FreeBSD-src-fb9048b07bd1c35bc75d6a5619a8a66c0cf40b4f.tar.gz |
Implement support for hardware debug registers on the i386.
Submitted by: Brian Dean <brdean@unx.sas.com>
Diffstat (limited to 'sys/miscfs')
-rw-r--r-- | sys/miscfs/procfs/procfs.h | 8 | ||||
-rw-r--r-- | sys/miscfs/procfs/procfs_subr.c | 7 | ||||
-rw-r--r-- | sys/miscfs/procfs/procfs_vnops.c | 8 |
3 files changed, 20 insertions, 3 deletions
diff --git a/sys/miscfs/procfs/procfs.h b/sys/miscfs/procfs/procfs.h index b38ed87..f813070 100644 --- a/sys/miscfs/procfs/procfs.h +++ b/sys/miscfs/procfs/procfs.h @@ -37,7 +37,7 @@ * @(#)procfs.h 8.9 (Berkeley) 5/14/95 * * From: - * $Id: procfs.h,v 1.25 1999/05/04 08:00:10 phk Exp $ + * $Id: procfs.h,v 1.26 1999/06/13 20:53:13 phk Exp $ */ /* @@ -51,6 +51,7 @@ typedef enum { Pmem, /* the process's memory image */ Pregs, /* the process's register set */ Pfpregs, /* the process's FP register set */ + Pdbregs, /* the process's debug register set */ Pctl, /* process control */ Pstatus, /* process status */ Pnote, /* process notifier */ @@ -124,6 +125,7 @@ vfs_namemap_t *vfs_findname __P((vfs_namemap_t *, char *, int)); /* <machine/reg.h> */ struct reg; struct fpreg; +struct dbreg; #define PFIND(pid) ((pid) ? pfind(pid) : &proc0) @@ -137,9 +139,12 @@ int procfs_read_regs __P((struct proc *, struct reg *)); int procfs_write_regs __P((struct proc *, struct reg *)); int procfs_read_fpregs __P((struct proc *, struct fpreg *)); int procfs_write_fpregs __P((struct proc *, struct fpreg *)); +int procfs_read_dbregs __P((struct proc *, struct dbreg *)); +int procfs_write_dbregs __P((struct proc *, struct dbreg *)); int procfs_donote __P((struct proc *, struct proc *, struct pfsnode *pfsp, struct uio *uio)); int procfs_doregs __P((struct proc *, struct proc *, struct pfsnode *pfsp, struct uio *uio)); int procfs_dofpregs __P((struct proc *, struct proc *, struct pfsnode *pfsp, struct uio *uio)); +int procfs_dodbregs __P((struct proc *, struct proc *, struct pfsnode *pfsp, struct uio *uio)); int procfs_domem __P((struct proc *, struct proc *, struct pfsnode *pfsp, struct uio *uio)); int procfs_doctl __P((struct proc *, struct proc *, struct pfsnode *pfsp, struct uio *uio)); int procfs_dostatus __P((struct proc *, struct proc *, struct pfsnode *pfsp, struct uio *uio)); @@ -155,6 +160,7 @@ int procfs_kmemaccess __P((struct proc *)); int procfs_validfile __P((struct proc *)); int procfs_validfpregs __P((struct proc *)); int procfs_validregs __P((struct proc *)); +int procfs_validdbregs __P((struct proc *)); int procfs_validmap __P((struct proc *)); int procfs_validtype __P((struct proc *)); diff --git a/sys/miscfs/procfs/procfs_subr.c b/sys/miscfs/procfs/procfs_subr.c index 7b5e18c..cf313e8 100644 --- a/sys/miscfs/procfs/procfs_subr.c +++ b/sys/miscfs/procfs/procfs_subr.c @@ -36,7 +36,7 @@ * * @(#)procfs_subr.c 8.6 (Berkeley) 5/14/95 * - * $Id: procfs_subr.c,v 1.23 1999/01/27 22:42:07 dillon Exp $ + * $Id: procfs_subr.c,v 1.24 1999/04/30 13:04:21 phk Exp $ */ #include <sys/param.h> @@ -167,6 +167,7 @@ loop: case Pregs: case Pfpregs: + case Pdbregs: pfs->pfs_mode = (VREAD|VWRITE); vp->v_type = VREG; break; @@ -264,6 +265,10 @@ procfs_rw(ap) rtval = procfs_dofpregs(curp, p, pfs, uio); break; + case Pdbregs: + rtval = procfs_dodbregs(curp, p, pfs, uio); + break; + case Pctl: rtval = procfs_doctl(curp, p, pfs, uio); break; diff --git a/sys/miscfs/procfs/procfs_vnops.c b/sys/miscfs/procfs/procfs_vnops.c index d421bac..fc47353 100644 --- a/sys/miscfs/procfs/procfs_vnops.c +++ b/sys/miscfs/procfs/procfs_vnops.c @@ -36,7 +36,7 @@ * * @(#)procfs_vnops.c 8.18 (Berkeley) 5/21/95 * - * $Id: procfs_vnops.c,v 1.68 1999/05/04 08:01:55 phk Exp $ + * $Id: procfs_vnops.c,v 1.69 1999/06/13 20:53:16 phk Exp $ */ /* @@ -95,6 +95,7 @@ static struct proc_target { { DT_REG, N("mem"), Pmem, NULL }, { DT_REG, N("regs"), Pregs, procfs_validregs }, { DT_REG, N("fpregs"), Pfpregs, procfs_validfpregs }, + { DT_REG, N("dbregs"), Pdbregs, procfs_validdbregs }, { DT_REG, N("ctl"), Pctl, NULL }, { DT_REG, N("status"), Pstatus, NULL }, { DT_REG, N("note"), Pnote, NULL }, @@ -491,6 +492,7 @@ procfs_getattr(ap) case Pctl: case Pregs: case Pfpregs: + case Pdbregs: if (procp->p_flag & P_SUGID) vap->va_mode &= ~((VREAD|VWRITE)| ((VREAD|VWRITE)>>3)| @@ -571,6 +573,10 @@ procfs_getattr(ap) vap->va_bytes = vap->va_size = sizeof(struct fpreg); break; + case Pdbregs: + vap->va_bytes = vap->va_size = sizeof(struct dbreg); + break; + case Ptype: case Pmap: case Pctl: |