Date: 05 Oct 2001 01:11:38 +0200 From: Dag-Erling Smorgrav <des@ofug.org> To: Peter Wemm <peter@wemm.org> Cc: arch@FreeBSD.ORG Subject: Re: Removing ptrace(2)'s dependency on procfs(5) Message-ID: <xzpofnnatlh.fsf@flood.ping.uio.no> In-Reply-To: <20011004230154.4A0D63809@overcee.netplex.com.au> References: <20011004230154.4A0D63809@overcee.netplex.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
Peter Wemm <peter@wemm.org> writes: > Dag-Erling Smorgrav wrote: > > - move procfs_rwmem() from src/sys/fs/procfs/procfs_mem.c into > > src/sys/kern/sys_process.c or some other convenient location where > > both ptrace(2) and procfs(5) can access it (and also move its > > prototype to a convenient header file). > It seems to be mostly VM code, perhaps it should be somewhere in vm/*, > perhaps vm/vm_glue.c ? procfs_rwmem() was originally derived from code which still resides (#if 0'd out) in sys_process.c. That's why I felt it was the most logical place to move it to. > Would it not make more sense to just make ptrace_{read|write}_*regs() > in machdep.c rather than have ptrace go via procfs functions and back to > machdep.c? That's exactly what I'm saying. In case you're confused, the PROCFS_ACTION() stuff in procfs_machdep.c has nothing to do with procfs, it's just a poorly-named macro that evaluates its arguments and does some error checking. > This doesn't have to be done all at once. The patch that you posted after > this one looks like a good start so far. Yep - at some point the functions should be renamed, and the prototypes should probably go into <sys/ptrace.h> instead of the bogus <sys/debug.h> I added. DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzpofnnatlh.fsf>