Hi Roland, On Tue, 2008-12-16 at 21:25 +0100, Denys Vlasenko wrote: > 2008-12-16 Denys Vlasenko <dvlas...@redhat.com> > > * defs.h: Add new field "sigtrap80" to struct tcb. > * strace.c (alloc_tcb): Initialize it. > (detach, trace): Use it in place of constant SIGTRAP. > (trace): Set PTRACE_O_TRACESYSGOOD and PTRACE_O_TRACEEXEC > options on newly traced threads; detect these > options if they are inherited across clone(); detect > and handle execve's ptrace stop; add paranoia checks > if real SIGTRAP is seen. > > > Run tested on vanilla and utrace-based kernels. > Tested with "kill -TRAP $pid": > > strace sleep N > > strace sh -c "trap 'echo Oi' TRAP; sleep 1; sleep 1; sleep 1; sleep 1" > > strace -f -oLOG firefox > > None of the above works correctly with unpatched strace, > with patch SIGTRAP is visible in strace and acts > as any other signal.
I committed this patch to cvs. I put relevant code into #ifdef LINUX as I unsure that corresponding PTRACE_xxx constants even exist on other OSes. Still, yell at me if something broke as a result, and I will revert or fix it. -- vda ------------------------------------------------------------------------------ _______________________________________________ Strace-devel mailing list Strace-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/strace-devel