These parameters are of kernel_ulong_t type. * process_vm.c (SYS_FUNC(process_vm_readv)): Use getarg_ull for local_iovcnt, renote_iovcnt, flags parameters. (SYS_FUNC(process_vm_writev)): Likewise. --- process_vm.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/process_vm.c b/process_vm.c index 03e7594..3227036 100644 --- a/process_vm.c +++ b/process_vm.c @@ -34,42 +34,50 @@ SYS_FUNC(process_vm_readv) /* arg 1: pid */ tprintf("%d, ", (int) tcp->u_arg[0]); } else { + unsigned long long local_iovcnt = getarg_ull(tcp, 2); + unsigned long long remote_iovcnt = getarg_ull(tcp, 4); + unsigned long long flags = getarg_ull(tcp, 5); + /* arg 2: local iov */ if (syserror(tcp)) { printaddr(tcp->u_arg[1]); } else { - tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], + tprint_iov(tcp, local_iovcnt, tcp->u_arg[1], IOV_DECODE_STR); } /* arg 3: local iovcnt */ - tprintf(", %lu, ", tcp->u_arg[2]); + tprintf(", %llu, ", local_iovcnt); /* arg 4: remote iov */ if (syserror(tcp)) { printaddr(tcp->u_arg[3]); } else { - tprint_iov(tcp, tcp->u_arg[4], tcp->u_arg[3], + tprint_iov(tcp, remote_iovcnt, tcp->u_arg[3], IOV_DECODE_ADDR); } /* arg 5: remote iovcnt */ /* arg 6: flags */ - tprintf(", %lu, %lu", tcp->u_arg[4], tcp->u_arg[5]); + tprintf(", %llu, %llu", remote_iovcnt, flags); } return 0; } SYS_FUNC(process_vm_writev) { + unsigned long long local_iovcnt = getarg_ull(tcp, 2); + unsigned long long remote_iovcnt = getarg_ull(tcp, 4); + unsigned long long flags = getarg_ull(tcp, 5); + /* arg 1: pid */ tprintf("%d, ", (int) tcp->u_arg[0]); /* arg 2: local iov */ - tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], IOV_DECODE_STR); + tprint_iov(tcp, local_iovcnt, tcp->u_arg[1], IOV_DECODE_STR); /* arg 3: local iovcnt */ - tprintf(", %lu, ", tcp->u_arg[2]); + tprintf(", %llu, ", local_iovcnt); /* arg 4: remote iov */ - tprint_iov(tcp, tcp->u_arg[4], tcp->u_arg[3], IOV_DECODE_ADDR); + tprint_iov(tcp, remote_iovcnt, tcp->u_arg[3], IOV_DECODE_ADDR); /* arg 5: remote iovcnt */ /* arg 6: flags */ - tprintf(", %lu, %lu", tcp->u_arg[4], tcp->u_arg[5]); + tprintf(", %llu, %llu", remote_iovcnt, flags); return RVAL_DECODED; } -- 1.7.10.4 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Strace-devel mailing list Strace-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/strace-devel