]> granicus.if.org Git - strace/commitdiff
Change printargs to return RVAL_DECODED
authorDmitry V. Levin <ldv@altlinux.org>
Sun, 27 Nov 2016 14:19:09 +0000 (14:19 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sun, 27 Nov 2016 14:22:58 +0000 (14:22 +0000)
As printargs is invoked as a generic syscall decoder only and
it is not supposed to print anything on exiting, change printargs
to return RVAL_DECODED so it would not be called on exiting at all.

* util.c (printargs): Print args unconditionally, return RVAL_DECODED.

util.c

diff --git a/util.c b/util.c
index e83f574aab28520654f5d9ed3866722b81bf6e6f..f80fd6e95e2d224ed4995e17b2a9a946df34c16d 100644 (file)
--- a/util.c
+++ b/util.c
@@ -1504,13 +1504,11 @@ getarg_ull(struct tcb *tcp, int argn)
 int
 printargs(struct tcb *tcp)
 {
-       if (entering(tcp)) {
-               int i;
-               int n = tcp->s_ent->nargs;
-               for (i = 0; i < n; i++)
-                       tprintf("%s%#llx", i ? ", " : "", getarg_ull(tcp, i));
-       }
-       return 0;
+       const int n = tcp->s_ent->nargs;
+       int i;
+       for (i = 0; i < n; ++i)
+               tprintf("%s%#llx", i ? ", " : "", getarg_ull(tcp, i));
+       return RVAL_DECODED;
 }
 
 int