Re: CLONE_PTRACE implementation incomplete

lars brinkhoff (lars.brinkhoff@intermec.com)
Tue, 28 Dec 1999 16:25:38 +0100


Mike Coleman wrote:
> 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.

I recently did something like this. I wrote a program called ptproxy that
uses ptrace() to catch ptrace() and wait() syscalls made by a debugger.
Then ptrace implemented these syscalls itself, applying them to another
process.

>From the README:
ptproxy spawns two children: a debugger and a program to be debugged.
ptproxy catches debugging calls from the debugger and forwards them
to the debugged program. The results are passed back to the debugger.

-
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/