[PATCH] Path decoding for system calls that return file descriptors implemented.

Zubin Mithra zubin.mithra at gmail.com
Tue May 27 16:56:50 UTC 2014


Hey Dmitry,

On Tue, May 27, 2014 at 2:47 PM, Dmitry V. Levin <ldv at altlinux.org> wrote:
> On Tue, May 27, 2014 at 06:32:29AM +0530, Zubin Mithra wrote:
>> >> --- 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?
>>
>> According to the current implementation, it would behave as if a "-y"
>> had been performed. The fd returned would not be decoded.
>> Calls to printfd would behave as they normally would(if a "-y" had been used).
>
> Wouldn't it be more logical if more -y options didn't result to less
> amount of fd decoding?  Let's change the test to "show_fd_path > 1".
>

Indeed. I just submitted a patch with that chance.


Thanks,
-- zm




More information about the Strace-devel mailing list