]> granicus.if.org Git - strace/commitdiff
Implement process_vm_writev decoder
authorDmitry V. Levin <ldv@altlinux.org>
Sat, 10 Mar 2012 14:14:49 +0000 (14:14 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sat, 10 Mar 2012 14:14:49 +0000 (14:14 +0000)
* process.c (sys_process_vm_writev): New function.
* linux/syscall.h (sys_process_vm_writev): New prototype.

linux/syscall.h
process.c

index 4eb7368b1ce0f8a9a8a7736a05e88131e079f017..a260048014e0111f50c9a029e2ab8e5ab7901e3e 100644 (file)
@@ -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();
index 39e6f781c904abb7042a2da28e57749a83ee5948..a9b0eb30ad4ca8aa35960027454003c669345d73 100644 (file)
--- 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;
+}