]> granicus.if.org Git - strace/commit
Properly handle real SIGTRAPs.
authorDenys Vlasenko <dvlasenk@redhat.com>
Mon, 23 May 2011 19:29:03 +0000 (21:29 +0200)
committerDenys Vlasenko <dvlasenk@redhat.com>
Mon, 23 May 2011 19:29:03 +0000 (21:29 +0200)
commit3454e4b463e6c22c7ea8c5461ef5a077f4650a54
tree06fec43fc6e3e671b6cc88584df79592f0771bac
parent1cd5371d503c3e56084faf9732b17133d94df3ef
Properly handle real SIGTRAPs.

* defs.h (ptrace_setoptions): Variable renamed to ptrace_setoptions_followfork.
* process.c (internal_fork): Ditto.
* strace.c (ptrace_setoptions_for_all): New variable.
(SYSCALLTRAP): New variable.
(error_msg_and_die): New function.
(test_ptrace_setoptions_for_all): New function.
(main): Call test_ptrace_setoptions_for_all() at init.
(handle_ptrace_event): Handle PTRACE_EVENT_EXEC (by ignoring it).
(trace): Check events and set ptrace options without -f too.
Check WSTOPSIG(status) not for SIGTRAP, but for SYSCALLTRAP.
defs.h
process.c
strace.c