* syscall.c (trace_syscall_entering): Check for sys_exit instead of SYS_exit to handle exit_group(2) as well as _exit(2). --- Before the fix: $ strace -e exit_group -e raw=all /bin/true exit_group(0 <unfinished ... exit status 0> After the fix: $ strace -e exit_group -e raw=all /bin/true exit_group(0) = ?
Also, __NR_exit on x86-64 has the same value as __NR_umask on i386,
so strace -e raw=all would decode 32-bit umask(2) anyway.
syscall.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/syscall.c b/syscall.c
index 79d3b4a..e66ac0a 100644
--- a/syscall.c
+++ b/syscall.c
@@ -2707,7 +2707,8 @@ trace_syscall_entering(struct tcb *tcp)
else
tprintf("%s(", sysent[tcp->scno].sys_name);
if (tcp->scno >= nsyscalls || tcp->scno < 0 ||
- ((qual_flags[tcp->scno] & QUAL_RAW) && tcp->scno != SYS_exit))
+ ((qual_flags[tcp->scno] & QUAL_RAW) &&
+ sysent[tcp->scno].sys_func != sys_exit))
sys_res = printargs(tcp);
else
sys_res = (*sysent[tcp->scno].sys_func)(tcp);
--
ldv
pgpFzSmZ147Vh.pgp
Description: PGP signature
------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________ Strace-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/strace-devel
