]> granicus.if.org Git - strace/commit
Set PTRACE_O_TRACEEXIT option and handle PTRACE_EVENT_EXIT events
authorDmitry V. Levin <ldv@altlinux.org>
Sat, 26 Nov 2016 23:45:05 +0000 (23:45 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sun, 27 Nov 2016 14:22:58 +0000 (14:22 +0000)
commit2f948b92316e30c5e19f413b863387dbb2de2451
tree8cba60c72714b14d87d25f5aa966b25c908456a2
parent37c4d4bcfcfe169e5adc2935168ef30aa565d771
Set PTRACE_O_TRACEEXIT option and handle PTRACE_EVENT_EXIT events

Do not assume that some syscalls do not generate syscall-exit-stops.
When syscalls fail for any reason they may generate syscall-exit-stops.

The solution is to wait for an actual exit reported by PTRACE_EVENT_EXIT
and print the end of unfinished exiting syscall properly.

* exit.c: Remove.
* Makefile.am (strace_SOURCES): Remove exit.c.
* linux/dummy.h (sys_exit): Alias to printargs_d.
* strace.c (ptrace_setoptions): Add PTRACE_O_TRACEEXIT bit.
(print_event_exit): New function.
(trace): Use it in case of PTRACE_EVENT_EXIT.
* syscall.c (trace_syscall_entering): Remove special handling
of SEN_exit.
Makefile.am
exit.c [deleted file]
linux/dummy.h
strace.c
syscall.c