diff options
author | Dmitry V. Levin <ldv@strace.io> | 2022-12-24 08:00:00 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2022-12-24 08:00:00 +0000 |
commit | 2afe6f829d0a8827ea340f5a52afb504b9321a6d (patch) | |
tree | fbcff6c98de2fff2bf3a879825b09a208b84e27f | |
parent | 439a1f1e80df4a9af9bcb82b626686fc6497735c (diff) | |
download | strace-2afe6f829d0a8827ea340f5a52afb504b9321a6d.tar.gz |
syscall: simplify syscall_exiting_trace a bit
* src/syscall.c (syscall_exiting_trace): Print the auxiliary string
and the injection note just in one location.
-rw-r--r-- | src/syscall.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/syscall.c b/src/syscall.c index 5f9136c67..2c025091a 100644 --- a/src/syscall.c +++ b/src/syscall.c @@ -837,8 +837,6 @@ syscall_exiting_trace(struct tcb *tcp, struct timespec *ts, int res) print_err_ret(tcp->u_rval, tcp->u_error); else tprintf_string("= %#" PRI_klx, tcp->u_rval); - - print_injected_note(tcp); } else if (!(sys_res & RVAL_NONE) && tcp->u_error) { switch (tcp->u_error) { /* Blocked signals do not interrupt any syscalls. @@ -898,9 +896,6 @@ syscall_exiting_trace(struct tcb *tcp, struct timespec *ts, int res) print_err_ret(tcp->u_rval, tcp->u_error); break; } - if ((sys_res & RVAL_STR) && tcp->auxstr) - tprintf_string(" (%s)", tcp->auxstr); - print_injected_note(tcp); } else { if (sys_res & RVAL_NONE) tprints_string("= ?"); @@ -972,10 +967,10 @@ syscall_exiting_trace(struct tcb *tcp, struct timespec *ts, int res) break; } } - if ((sys_res & RVAL_STR) && tcp->auxstr) - tprintf_string(" (%s)", tcp->auxstr); - print_injected_note(tcp); } + if ((sys_res & RVAL_STR) && tcp->auxstr) + tprintf_string(" (%s)", tcp->auxstr); + print_injected_note(tcp); if (Tflag) { tprint_space(); tprint_associated_info_begin(); |