Dmitry V. Levin | db16c52 | 2014-12-11 19:21:54 +0000 | [diff] [blame] | 1 | #include "defs.h" |
| 2 | |
Dmitry V. Levin | a0bd374 | 2015-04-07 01:36:50 +0000 | [diff] [blame] | 3 | SYS_FUNC(process_vm_readv) |
Dmitry V. Levin | db16c52 | 2014-12-11 19:21:54 +0000 | [diff] [blame] | 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)) { |
Dmitry V. Levin | 66a344c | 2015-07-17 20:37:47 +0000 | [diff] [blame] | 11 | printaddr(tcp->u_arg[1]); |
Dmitry V. Levin | db16c52 | 2014-12-11 19:21:54 +0000 | [diff] [blame] | 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)) { |
Dmitry V. Levin | 66a344c | 2015-07-17 20:37:47 +0000 | [diff] [blame] | 19 | printaddr(tcp->u_arg[3]); |
Dmitry V. Levin | db16c52 | 2014-12-11 19:21:54 +0000 | [diff] [blame] | 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 | |
Dmitry V. Levin | a0bd374 | 2015-04-07 01:36:50 +0000 | [diff] [blame] | 30 | SYS_FUNC(process_vm_writev) |
Dmitry V. Levin | db16c52 | 2014-12-11 19:21:54 +0000 | [diff] [blame] | 31 | { |
Dmitry V. Levin | 684c9e9 | 2015-07-17 20:39:49 +0000 | [diff] [blame] | 32 | /* arg 1: pid */ |
| 33 | tprintf("%ld, ", tcp->u_arg[0]); |
| 34 | /* arg 2: local iov */ |
| 35 | tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], 1); |
| 36 | /* arg 3: local iovcnt */ |
| 37 | tprintf(", %lu, ", tcp->u_arg[2]); |
| 38 | /* arg 4: remote iov */ |
| 39 | tprint_iov(tcp, tcp->u_arg[4], tcp->u_arg[3], 0); |
| 40 | /* arg 5: remote iovcnt */ |
| 41 | /* arg 6: flags */ |
| 42 | tprintf(", %lu, %lu", tcp->u_arg[4], tcp->u_arg[5]); |
| 43 | |
| 44 | return RVAL_DECODED; |
Dmitry V. Levin | db16c52 | 2014-12-11 19:21:54 +0000 | [diff] [blame] | 45 | } |