summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@redhat.com>2009-11-04 17:08:34 +0100
committerAndreas Schwab <schwab@redhat.com>2009-11-04 17:10:25 +0100
commitb5600fc3df0453ba11f254a9b49add3ffbec9733 (patch)
tree3cb96cf36318e181d476e5b3cfd2e31885e997ce /io.c
parentd45f0a66c1c60c9703c7fd0b826a6436e0adc17a (diff)
downloadstrace-b5600fc3df0453ba11f254a9b49add3ffbec9733.tar.gz
strace-b5600fc3df0453ba11f254a9b49add3ffbec9733.tar.bz2
strace-b5600fc3df0453ba11f254a9b49add3ffbec9733.tar.xz
Factor out printing of 64bit syscall argument
* defs.h (ALIGN64): Remove. (printllval): Declare. * util.c (printllval): Define. * file.c (sys_readahead): Use printllval. (sys_lseek64): Likewise. (sys_truncate64): Likewise. (sys_ftruncate64): Likewise. (sys_fadvise64): Likewise. (sys_fadvise64_64): Likewise. (sys_fallocate): Likewise. * io.c (sys_pread): Likewise. (sys_pwrite): Likewise. (sys_pread64): Likewise. (sys_pwrite64): Likewise. * mem.c (sys_mmap64): Likewise.
Diffstat (limited to 'io.c')
-rw-r--r--io.c28
1 files changed, 8 insertions, 20 deletions
diff --git a/io.c b/io.c
index add3fb6..3d2970c 100644
--- a/io.c
+++ b/io.c
@@ -286,9 +286,8 @@ struct tcb *tcp;
tprintf("%#lx", tcp->u_arg[1]);
else
printstr(tcp, tcp->u_arg[1], tcp->u_rval);
- ALIGN64 (tcp, PREAD_OFFSET_ARG); /* PowerPC alignment restriction */
- tprintf(", %lu, %llu", tcp->u_arg[2],
- *(unsigned long long *)&tcp->u_arg[PREAD_OFFSET_ARG]);
+ tprintf(", %lu, ", tcp->u_arg[2]);
+ printllval(tcp, "%llu", PREAD_OFFSET_ARG);
}
return 0;
}
@@ -300,9 +299,8 @@ struct tcb *tcp;
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
- ALIGN64 (tcp, PREAD_OFFSET_ARG); /* PowerPC alignment restriction */
- tprintf(", %lu, %llu", tcp->u_arg[2],
- *(unsigned long long *)&tcp->u_arg[PREAD_OFFSET_ARG]);
+ tprintf(", %lu, ", tcp->u_arg[2]);
+ printllval(tcp, "%llu", PREAD_OFFSET_ARG);
}
return 0;
}
@@ -355,17 +353,12 @@ struct tcb *tcp;
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
} else {
- ALIGN64 (tcp, 3);
if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[1]);
else
printstr(tcp, tcp->u_arg[1], tcp->u_rval);
-#ifdef MIPS_LINUXN32
- tprintf(", %lu, %#llx", tcp->u_arg[2], tcp->ext_arg[3]);
-#else
- tprintf(", %lu, %#llx", tcp->u_arg[2],
- LONG_LONG(tcp->u_arg[3], tcp->u_arg[4]));
-#endif
+ tprintf(", %lu, ", tcp->u_arg[2]);
+ printllval(tcp, "%#llx", 3);
}
return 0;
}
@@ -375,15 +368,10 @@ sys_pwrite64(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
- ALIGN64 (tcp, 3);
tprintf("%ld, ", tcp->u_arg[0]);
printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
-#ifdef MIPS_LINUXN32
- tprintf(", %lu, %#llx", tcp->u_arg[2], tcp->ext_arg[3]);
-#else
- tprintf(", %lu, %#llx", tcp->u_arg[2],
- LONG_LONG(tcp->u_arg[3], tcp->u_arg[4]));
-#endif
+ tprintf(", %lu, ", tcp->u_arg[2]);
+ printllval(tcp, "%#llx", 3);
}
return 0;
}