Date: Thu, 04 Oct 2001 16:01:54 -0700 From: Peter Wemm <peter@wemm.org> To: Dag-Erling Smorgrav <des@ofug.org> Cc: arch@FreeBSD.ORG Subject: Re: Removing ptrace(2)'s dependency on procfs(5) Message-ID: <20011004230154.4A0D63809@overcee.netplex.com.au> In-Reply-To: <xzpd743co4b.fsf@flood.ping.uio.no>
next in thread | previous in thread | raw e-mail | index | archive | help
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 ? > - rewrite the remaining cases (PT_{GET,SET}{,DB,FP}REGS) to call > procfs_{read,write}_regs() (which is implemented in each port's > procfs_machdep.c) directly, instead of calling procfs_do*(). Hmm. We have things like this: int procfs_read_regs(td, regs) struct thread *td; struct reg *regs; { PROCFS_ACTION(fill_regs(td, regs)); } int procfs_sstep(td) struct thread *td; { PROCFS_ACTION(ptrace_single_step(td)); } 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? 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. Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au "All of this is for nothing if we don't go to the stars" - JMS/B5 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?20011004230154.4A0D63809>