1 #include "defs.h"
2 
SYS_FUNC(process_vm_readv)3 SYS_FUNC(process_vm_readv)
4 {
5 	if (entering(tcp)) {
6 		/* arg 1: pid */
7 		tprintf("%ld, ", tcp->u_arg[0]);
8 	} else {
9 		/* arg 2: local iov */
10 		if (syserror(tcp)) {
11 			tprintf("%#lx", tcp->u_arg[1]);
12 		} else {
13 			tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], 1);
14 		}
15 		/* arg 3: local iovcnt */
16 		tprintf(", %lu, ", tcp->u_arg[2]);
17 		/* arg 4: remote iov */
18 		if (syserror(tcp)) {
19 			tprintf("%#lx", tcp->u_arg[3]);
20 		} else {
21 			tprint_iov(tcp, tcp->u_arg[4], tcp->u_arg[3], 0);
22 		}
23 		/* arg 5: remote iovcnt */
24 		/* arg 6: flags */
25 		tprintf(", %lu, %lu", tcp->u_arg[4], tcp->u_arg[5]);
26 	}
27 	return 0;
28 }
29 
SYS_FUNC(process_vm_writev)30 SYS_FUNC(process_vm_writev)
31 {
32 	if (entering(tcp)) {
33 		/* arg 1: pid */
34 		tprintf("%ld, ", tcp->u_arg[0]);
35 		/* arg 2: local iov */
36 		tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], 1);
37 		/* arg 3: local iovcnt */
38 		tprintf(", %lu, ", tcp->u_arg[2]);
39 		/* arg 4: remote iov */
40 		tprint_iov(tcp, tcp->u_arg[4], tcp->u_arg[3], 0);
41 		/* arg 5: remote iovcnt */
42 		/* arg 6: flags */
43 		tprintf(", %lu, %lu", tcp->u_arg[4], tcp->u_arg[5]);
44 	}
45 	return 0;
46 }
47