summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2013-05-03 22:27:45 +0000
committerDmitry V. Levin <ldv@altlinux.org>2013-05-03 23:45:54 +0000
commita55b6b193c0bc7e84fd3b56be20ce546c51eb068 (patch)
tree179d290f894a6e48e945f0cfdf6d49a189192bf3 /util.c
parentd648f29cc3aeabf0a0430f8ab12ce35fa6c4e48e (diff)
downloadstrace-a55b6b193c0bc7e84fd3b56be20ce546c51eb068.tar.gz
strace-a55b6b193c0bc7e84fd3b56be20ce546c51eb068.tar.bz2
strace-a55b6b193c0bc7e84fd3b56be20ce546c51eb068.tar.xz
arm, aarch64, ppc: fix printllval-based decoders
* util.c (printllval) [ARM || POWERPC]: Align argument number. [AARCH64]: Align argument number in 32bit mode. * file.c (sys_fadvise64_64) [ARM || POWERPC]: Remove no longer needed printllval workaround. [AARCH64]: Fix printing POSIX_FADV_* constants in 32bit mode.
Diffstat (limited to 'util.c')
-rw-r--r--util.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/util.c b/util.c
index eda6669..6f9f505 100644
--- a/util.c
+++ b/util.c
@@ -186,8 +186,8 @@ printllval(struct tcb *tcp, const char *format, int arg_no)
tprintf(format, tcp->u_arg[arg_no]);
arg_no++;
} else {
-# if defined(POWERPC64)
- /* Align arg_no to next even number */
+# if defined(AARCH64) || defined(POWERPC64)
+ /* Align arg_no to the next even number. */
arg_no = (arg_no + 1) & 0xe;
# endif
tprintf(format, LONG_LONG(tcp->u_arg[arg_no], tcp->u_arg[arg_no + 1]));
@@ -215,6 +215,10 @@ printllval(struct tcb *tcp, const char *format, int arg_no)
# if SIZEOF_LONG > 4
# error BUG: must not combine two args for long long on this arch
# endif
+#if defined(ARM) || defined(POWERPC)
+ /* Align arg_no to the next even number. */
+ arg_no = (arg_no + 1) & 0xe;
+#endif
tprintf(format, LONG_LONG(tcp->u_arg[arg_no], tcp->u_arg[arg_no + 1]));
arg_no += 2;
#endif