]> granicus.if.org Git - strace/commit
syscall.c: split trace_syscall() into 6 functions
authorVictor Krapivensky <krapivenskiy.va@phystech.edu>
Mon, 5 Jun 2017 19:19:07 +0000 (22:19 +0300)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 5 Jun 2017 19:25:04 +0000 (19:25 +0000)
commitf099124e8420bef9a33018d8a5521fa0d3d5d0be
treef7e813eb72dd772626df4d693b32ec9bd202ac2a
parent909ffde2d6143ffc1578df7651ded0d797d72876
syscall.c: split trace_syscall() into 6 functions

This change removes the trace_syscall function.  Now, the code that uses
syscall.c trace functions is expected to check whether it is a syscall
entry or exit (with entering(tcp)/exiting(tcp)) itself, and then make
an appropriate sequence of function calls.

* defs.h: Update comment on TCB_INSYSCALL.
(trace_syscall): Remove prototype.
(syscall_entering_decode, syscall_entering_trace,
syscall_entering_finish, syscall_exiting_decode, syscall_exiting_trace,
syscall_exiting_finish): New prototypes.
* strace.c (trace_syscall): New static replacement for old trace_syscall.
* syscall.c (trace_syscall): Remove.
(trace_syscall_entering): Split into ...
(syscall_entering_decode, syscall_entering_trace,
syscall_entering_finish): ... new functions.
(trace_syscall_exiting): Split into ...
(syscall_exiting_decode, syscall_exiting_trace,
syscall_exiting_finish): ... new functions.
defs.h
strace.c
syscall.c