[PATCH] Path decoding for system calls that return file descriptors implemented.
Dmitry V. Levin
ldv at altlinux.org
Mon May 26 23:23:34 UTC 2014
Hi Zubin,
On Mon, May 26, 2014 at 10:18:11PM +0530, zubin.mithra at gmail.com wrote:
> From: eQuiNoX__ <equinox.71717171 at gmail.com>
Could you choose one of your names for use in git commits and stick with
it, at least for the length of this GSoC, please? This could be done
e.g. by setting user.name and user.email with git-config(1).
> Subject: [PATCH] Path decoding for system calls that return file descriptors implemented.
Please try to make summary lines not longer than 72 characters, e.g.
Decode paths associated with file descriptors returned by syscalls
Also, please omit the trailing dot from summary lines.
> * Type of `show_fd_path` changed from `bool` to `unsigned int` to
> support the `-yy` flag
Why do you want to decode returned descriptors only for -yy?
Backwards compatibility?
> * util.c (returns_fd): New function that checks if the tcb refers
> to a function that returns a file descriptor
> * `trace_syscall_exiting` now uses `returns_fd` to determine if
> `tcp->u_rval` needs to be passed to `printfd`
(trace_syscall_exiting): Use returns_fd to determine whether tcp->u_rval
is a file descriptor.
> --- a/syscall.c
> +++ b/syscall.c
> @@ -2669,7 +2669,12 @@ trace_syscall_exiting(struct tcb *tcp)
> tprintf("= %lu", tcp->u_rval);
> break;
> case RVAL_DECIMAL:
> - tprintf("= %ld", tcp->u_rval);
> + if ( show_fd_path == 2 && returns_fd(tcp) ) {
What if show_fd_path > 2?
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20140527/7a48a474/attachment.bin>
More information about the Strace-devel
mailing list