From: Dmitry V. Levin Date: Sat, 10 Mar 2012 14:14:49 +0000 (+0000) Subject: Implement process_vm_writev decoder X-Git-Tag: v4.7~132 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=039521051e566420b48dc9f2e01691973ec39c02;p=strace Implement process_vm_writev decoder * process.c (sys_process_vm_writev): New function. * linux/syscall.h (sys_process_vm_writev): New prototype. --- diff --git a/linux/syscall.h b/linux/syscall.h index 4eb7368b..a2600480 100644 --- a/linux/syscall.h +++ b/linux/syscall.h @@ -175,6 +175,7 @@ int sys_preadv(); int sys_pselect6(); int sys_ptrace(); int sys_process_vm_readv(); +int sys_process_vm_writev(); int sys_putpmsg(); int sys_pwrite(); int sys_pwritev(); diff --git a/process.c b/process.c index 39e6f781..a9b0eb30 100644 --- a/process.c +++ b/process.c @@ -2774,3 +2774,28 @@ sys_process_vm_readv(struct tcb *tcp) } return 0; } + +int +sys_process_vm_writev(struct tcb *tcp) +{ + if (entering(tcp)) { + /* arg 1: pid */ + tprintf("%ld, ", tcp->u_arg[0]); + /* arg 2: local iov */ + if (syserror(tcp)) + tprintf("%#lx", tcp->u_arg[1]); + else + tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], 1); + /* arg 3: local iovcnt */ + tprintf(", %lu, ", tcp->u_arg[2]); + /* arg 4: remote iov */ + if (syserror(tcp)) + tprintf("%#lx", tcp->u_arg[3]); + else + tprint_iov(tcp, tcp->u_arg[4], tcp->u_arg[3], 0); + /* arg 5: remote iovcnt */ + /* arg 6: flags */ + tprintf(", %lu, %lu", tcp->u_arg[4], tcp->u_arg[5]); + } + return 0; +}