From owner-freebsd-arch Thu Oct 4 16: 1:58 2001 Delivered-To: freebsd-arch@freebsd.org Received: from peter3.wemm.org (c1315225-a.plstn1.sfba.home.com [24.14.150.180]) by hub.freebsd.org (Postfix) with ESMTP id A935637B403 for ; Thu, 4 Oct 2001 16:01:54 -0700 (PDT) Received: from overcee.netplex.com.au (overcee.wemm.org [10.0.0.3]) by peter3.wemm.org (8.11.0/8.11.0) with ESMTP id f94N1sM57997 for ; Thu, 4 Oct 2001 16:01:54 -0700 (PDT) (envelope-from peter@wemm.org) Received: from wemm.org (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id 4A0D63809; Thu, 4 Oct 2001 16:01:54 -0700 (PDT) (envelope-from peter@wemm.org) X-Mailer: exmh version 2.3.1 01/18/2001 with nmh-1.0.4 To: Dag-Erling Smorgrav Cc: arch@FreeBSD.ORG Subject: Re: Removing ptrace(2)'s dependency on procfs(5) In-Reply-To: Date: Thu, 04 Oct 2001 16:01:54 -0700 From: Peter Wemm Message-Id: <20011004230154.4A0D63809@overcee.netplex.com.au> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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