summaryrefslogtreecommitdiffstats
path: root/sys/fs/procfs/procfs_dbregs.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs/procfs/procfs_dbregs.c')
-rw-r--r--sys/fs/procfs/procfs_dbregs.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/sys/fs/procfs/procfs_dbregs.c b/sys/fs/procfs/procfs_dbregs.c
index dad4025..8977955 100644
--- a/sys/fs/procfs/procfs_dbregs.c
+++ b/sys/fs/procfs/procfs_dbregs.c
@@ -49,27 +49,22 @@
#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/ptrace.h>
-#include <sys/vnode.h>
+#include <sys/uio.h>
#include <machine/reg.h>
+#include <fs/pseudofs/pseudofs.h>
#include <fs/procfs/procfs.h>
-#include <vm/vm.h>
-
int
-procfs_dodbregs(curp, p, pfs, uio)
- struct proc *curp;
- struct proc *p;
- struct pfsnode *pfs;
- struct uio *uio;
+procfs_doprocdbregs(PFS_FILL_ARGS)
{
int error;
struct dbreg r;
char *kv;
int kl;
- if (p_candebug(curp, p))
+ if (p_candebug(td->td_proc, p) != 0)
return (EPERM);
kl = sizeof(r);
kv = (char *) &r;
@@ -79,8 +74,6 @@ procfs_dodbregs(curp, p, pfs, uio)
if (kl > uio->uio_resid)
kl = uio->uio_resid;
- PHOLD(p);
-
if (kl < 0)
error = EINVAL;
else
@@ -93,15 +86,7 @@ procfs_dodbregs(curp, p, pfs, uio)
else
error = proc_write_dbregs(&p->p_thread, &r); /* XXXKSE */
}
- PRELE(p);
uio->uio_offset = 0;
return (error);
}
-
-int
-procfs_validdbregs(struct thread *td)
-{
-
- return ((td->td_proc->p_flag & P_SYSTEM) == 0);
-}
OpenPOWER on IntegriCloud