summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/util.c b/util.c
index 85bb94c..d986f7c 100644
--- a/util.c
+++ b/util.c
@@ -225,7 +225,7 @@ printxval(const struct xlat *xlat, int val, const char *dflt)
* argument.
*/
int
-printllval(struct tcb *tcp, const char *format, int arg_no)
+printllval(struct tcb *tcp, const char *format, int arg_no, bool align)
{
#if SIZEOF_LONG > 4 && SIZEOF_LONG == SIZEOF_LONG_LONG
# if SUPPORTED_PERSONALITIES > 1
@@ -236,8 +236,10 @@ printllval(struct tcb *tcp, const char *format, int arg_no)
# if SUPPORTED_PERSONALITIES > 1
} else {
# if defined(AARCH64) || defined(POWERPC64)
- /* Align arg_no to the next even number. */
- arg_no = (arg_no + 1) & 0xe;
+ if (align) {
+ /* 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;
@@ -261,8 +263,10 @@ printllval(struct tcb *tcp, const char *format, int arg_no)
defined LINUX_MIPSO32 || \
defined POWERPC || \
defined XTENSA
- /* Align arg_no to the next even number. */
- arg_no = (arg_no + 1) & 0xe;
+ if (align) {
+ /* 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;