Date: Wed, 11 Apr 2007 12:10:03 -0800 From: "Kip Macy" <kip.macy@gmail.com> To: "Ed Maste" <ed.maste@gmail.com> Cc: cvs-src@freebsd.org, src-committers@freebsd.org, Xin LI <delphij@freebsd.org>, cvs-all@freebsd.org Subject: Re: cvs commit: src/usr.bin/truss Makefile amd64-fbsd.c extern.h i386-fbsd.c i386-linux.c ia64-fbsd.c main.c powerpc-fbsd.c setup.c sparc64-fbsd.c syscall.h syscalls.c truss.1 truss.h Message-ID: <b1fa29170704111310j5f61bc4ew4ed177807cf016bf@mail.gmail.com> In-Reply-To: <88607eb20704101217x4e3c81f9xf914f7da7714daf8@mail.gmail.com> References: <200704100403.l3A43ZnL057659@repoman.freebsd.org> <88607eb20704101217x4e3c81f9xf914f7da7714daf8@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 4/10/07, Ed Maste <ed.maste@gmail.com> wrote:
> On 10/04/07, Xin LI <delphij@freebsd.org> wrote:
> > Make use of ptrace(2) instead of procfs in truss(1), eliminating
> > yet another need of an available /proc/ mount.
>
> I've started to do the same thing to gcore(1), in order to make it
> work properly with threaded applications. I've removed its dependency
> on /proc/pid/mem, /proc/pid/regs, and /proc/pid/fpregs. However, it
> still relies on /proc/pid/status and /proc/pid/map which are not
> directly available via ptrace(2).
>
> This would make the -s option to gcore redundant (since the process
> will be stopped after attaching anyway). I don't know how useful a
> core from a non-stopped process is, anyhow.
Fork it to get a COW snapshot and then gcore the stopped forked process.
(Yes this would probably require a new syscall or a new ptrace
interface, but it would be trivial to add).
-Kip
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b1fa29170704111310j5f61bc4ew4ed177807cf016bf>
