[PATCH v2] Implement output staging for failed/successful syscalls
Dmitry V. Levin
ldv at altlinux.org
Sun Feb 5 12:50:30 UTC 2017
Hi,
On Wed, Jan 18, 2017 at 06:12:52PM +0100, Burkhard Kohl wrote:
> With not_failing_only/failing_only flags, syscall output
> is written to tcp->memf and either dropped or published
> at strace_syscall_exiting
>
> * stage_out.c strace_openmemstream(), drop_staged_out(),
> publish_staged_out().
> * defs.h added flags stage_out, failing only
> struct tcb: new members memf, memfptr, memfloc.
> * syscall.c print output depending on flags and outcome.
> * strace.c add option -Z +help
> modified tprintf, tprints
> set stage_output in main().
> * Makefile.am new: stage_out.c
> * configure.ac (AC_CHECK_FUNCS): open_memstream
> * strace.1 -z/-Z: description added
> ---
> Makefile.am | 1 +
> configure.ac | 1 +
> defs.h | 18 +++++++++
> stage_out.c | 120 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> strace.1 | 6 +++
> strace.c | 107 +++++++++++++++++++++++++++++++++++++++++++++++++---
> syscall.c | 18 +++++++++
> 7 files changed, 266 insertions(+), 5 deletions(-)
> create mode 100644 stage_out.c
I've tried to apply this, but git-am(1) failed with the following
diagnostics:
Applying: Implement output staging for failed/successful syscalls
.git/rebase-apply/patch:55: trailing whitespace.
size_t memfloc;
.git/rebase-apply/patch:125: trailing whitespace.
* open_memstream returns a FILE stream that allows writing to a
.git/rebase-apply/patch:126: trailing whitespace.
* dynamically growing buffer, that can be either copied to
.git/rebase-apply/patch:136: trailing whitespace.
FILE *fp = NULL; // to be returned
.git/rebase-apply/patch:171: trailing whitespace.
error_msg("syscall output dropped: %s ...", tcp->memfptr);
.git/rebase-apply/patch:195: space before tab in indent.
if (0 > fprintf(tcp->outf, "%s", tcp->memfptr)) {
.git/rebase-apply/patch:275: trailing whitespace.
#if HAVE_OPEN_MEMSTREAM == 0
.git/rebase-apply/patch:436: trailing whitespace.
stage_output = false;
.git/rebase-apply/patch:444: trailing whitespace.
stage_output = not_failing_only || failing_only;
fatal: 9 lines add whitespace errors.
--
ldv
More information about the Strace-devel
mailing list