I've thought about doing something like this. I'd really, really, really like
to have some way to trace processes without the Heisenberg effect. Because of
the reparenting games it plays, ptrace messes up the semantics of the
interaction between a traced process and its parent. These alterations
greatly limit the usefulness of ptrace. In a proper solution, any changes
should be absolutely minimal (e.g., if a process watched itself carefully, it
might notice that system calls run slower while it's being traced).
(I'm not sure, but Solaris' /proc/<pid>/ctl interface looks like it might have
this property. See
'http://docs.sun.com:80/ab2/coll.40.5/REFMAN4/@Ab2PageView/69221?DwebQuery=PCSENTRY&Ab2Lang=C&Ab2Enc=iso-8859-1'.)
A second thing I'd like to have is the ability to have multiple tracers (as
opposed the single tracer currently allowed by ptrace). This would allow, for
example, a user to run 'strace' and 'gdb' on the same process. This can
probably mostly be faked in user mode, but it looks painful.
--Mike
-- Any sufficiently adverse technology is indistinguishable from Microsoft.- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/