reorganization of ptrace/procfs code

This commit is contained in:
cgd 1994-01-08 10:47:02 +00:00
parent b1d368ed16
commit e2efe41199
2 changed files with 7 additions and 12 deletions

View File

@ -37,7 +37,7 @@
* From:
* Id: procfs_ctl.c,v 4.1 1993/12/17 10:47:45 jsp Rel
*
* $Id: procfs_ctl.c,v 1.1 1994/01/05 07:51:15 cgd Exp $
* $Id: procfs_ctl.c,v 1.2 1994/01/08 10:47:02 cgd Exp $
*/
#include <sys/param.h>
@ -46,6 +46,7 @@
#include <sys/kernel.h>
#include <sys/proc.h>
#include <sys/vnode.h>
#include <sys/ptrace.h>
#include <sys/ioctl.h>
#include <sys/tty.h>
#include <sys/resource.h>
@ -61,13 +62,6 @@
(p)->p_pptr == (curp) && \
((p)->p_flag & STRC))
#define FIX_SSTEP(p) { \
if ((p)->p_stat & SSSTEP) { \
procfs_fix_sstep(p); \
(p)->p_stat &= ~SSSTEP; \
} \
}
#define PROCFS_CTL_ATTACH 1
#define PROCFS_CTL_DETACH 2
#define PROCFS_CTL_STEP 3
@ -204,7 +198,7 @@ procfs_control(curp, p, op)
* Step. Let the target process execute a single instruction.
*/
case PROCFS_CTL_STEP:
procfs_sstep(p);
process_sstep(p);
break;
/*

View File

@ -37,7 +37,7 @@
* From:
* Id: procfs_regs.c,v 4.1 1993/12/17 10:47:45 jsp Rel
*
* $Id: procfs_regs.c,v 1.1 1994/01/05 07:51:24 cgd Exp $
* $Id: procfs_regs.c,v 1.2 1994/01/08 10:47:06 cgd Exp $
*/
#include <sys/param.h>
@ -46,6 +46,7 @@
#include <sys/kernel.h>
#include <sys/proc.h>
#include <sys/vnode.h>
#include <sys/ptrace.h>
#include <machine/reg.h>
#include <miscfs/procfs/procfs.h>
@ -71,14 +72,14 @@ pfs_doregs(curp, p, pfs, uio)
if (kl < 0)
error = EINVAL;
else
error = procfs_read_regs(p, &r);
error = process_read_regs(p, &r);
if (error == 0)
error = uiomove(kv, kl, uio);
if (error == 0 && uio->uio_rw == UIO_WRITE) {
if ((p->p_flag & SSTOP) == 0)
error = EBUSY;
else
error = procfs_write_regs(p, &r);
error = process_write_regs(p, &r);
}
uio->uio_offset = 0;