blob: 9bd85a87bff3ec0e9d5fb22b44014c5c21e0d498 [file] [log] [blame]
Dmitry V. Levindb16c522014-12-11 19:21:54 +00001#include "defs.h"
2
3int
4sys_process_vm_readv(struct tcb *tcp)
5{
6 if (entering(tcp)) {
7 /* arg 1: pid */
8 tprintf("%ld, ", tcp->u_arg[0]);
9 } else {
10 /* arg 2: local iov */
11 if (syserror(tcp)) {
12 tprintf("%#lx", tcp->u_arg[1]);
13 } else {
14 tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], 1);
15 }
16 /* arg 3: local iovcnt */
17 tprintf(", %lu, ", tcp->u_arg[2]);
18 /* arg 4: remote iov */
19 if (syserror(tcp)) {
20 tprintf("%#lx", tcp->u_arg[3]);
21 } else {
22 tprint_iov(tcp, tcp->u_arg[4], tcp->u_arg[3], 0);
23 }
24 /* arg 5: remote iovcnt */
25 /* arg 6: flags */
26 tprintf(", %lu, %lu", tcp->u_arg[4], tcp->u_arg[5]);
27 }
28 return 0;
29}
30
31int
32sys_process_vm_writev(struct tcb *tcp)
33{
34 if (entering(tcp)) {
35 /* arg 1: pid */
36 tprintf("%ld, ", tcp->u_arg[0]);
37 /* arg 2: local iov */
38 if (syserror(tcp))
39 tprintf("%#lx", tcp->u_arg[1]);
40 else
41 tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], 1);
42 /* arg 3: local iovcnt */
43 tprintf(", %lu, ", tcp->u_arg[2]);
44 /* arg 4: remote iov */
45 if (syserror(tcp))
46 tprintf("%#lx", tcp->u_arg[3]);
47 else
48 tprint_iov(tcp, tcp->u_arg[4], tcp->u_arg[3], 0);
49 /* arg 5: remote iovcnt */
50 /* arg 6: flags */
51 tprintf(", %lu, %lu", tcp->u_arg[4], tcp->u_arg[5]);
52 }
53 return 0;
54}