diff options
author | mckusick <mckusick@FreeBSD.org> | 2000-12-12 07:25:57 +0000 |
---|---|---|
committer | mckusick <mckusick@FreeBSD.org> | 2000-12-12 07:25:57 +0000 |
commit | cba301121bc106aaff382428a55f31fef30844e6 (patch) | |
tree | 910e5652e5d16d5d0d4e8480f7e386aaf0ca310e /sys/kern/sys_process.c | |
parent | d577ae457b219ac16b4e152a40ae4d7474c4622f (diff) | |
download | FreeBSD-src-cba301121bc106aaff382428a55f31fef30844e6.zip FreeBSD-src-cba301121bc106aaff382428a55f31fef30844e6.tar.gz |
Change the proc information returned from the kernel so that it
no longer contains kernel specific data structures, but rather
only scalar values and structures that are already part of the
kernel/user interface, specifically rusage and rtprio. It no
longer contains proc, session, pcred, ucred, procsig, vmspace,
pstats, mtx, sigiolst, klist, callout, pasleep, or mdproc. If
any of these changed in size, ps, w, fstat, gcore, systat, and
top would all stop working. The new structure has over 200 bytes
of unassigned space for future values to be added, yet is nearly
100 bytes smaller per entry than the structure that it replaced.
Diffstat (limited to 'sys/kern/sys_process.c')
-rw-r--r-- | sys/kern/sys_process.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c index c9abad4..5bdeb78 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -339,7 +339,7 @@ ptrace(curp, uap) } if (uap->addr != (caddr_t)1) { - fill_eproc (p, &p->p_addr->u_kproc.kp_eproc); + fill_kinfo_proc (p, &p->p_addr->u_kproc); if ((error = ptrace_set_pc (p, (u_long)(uintfptr_t)uap->addr))) { PRELE(p); @@ -428,8 +428,7 @@ ptrace(curp, uap) error = 0; PHOLD(p); /* user had damn well better be incore! */ if (p->p_flag & P_INMEM) { - p->p_addr->u_kproc.kp_proc = *p; - fill_eproc (p, &p->p_addr->u_kproc.kp_eproc); + fill_kinfo_proc (p, &p->p_addr->u_kproc); curp->p_retval[0] = *(int *) ((uintptr_t)p->p_addr + (uintptr_t)uap->addr); } else { @@ -442,8 +441,7 @@ ptrace(curp, uap) case PT_WRITE_U: PHOLD(p); /* user had damn well better be incore! */ if (p->p_flag & P_INMEM) { - p->p_addr->u_kproc.kp_proc = *p; - fill_eproc (p, &p->p_addr->u_kproc.kp_eproc); + fill_kinfo_proc (p, &p->p_addr->u_kproc); error = ptrace_write_u(p, (vm_offset_t)uap->addr, uap->data); } else { error = EFAULT; |