]> granicus.if.org Git - strace/commitdiff
printllval: handle s390x
authorMike Frysinger <vapier@gentoo.org>
Wed, 1 May 2013 03:48:07 +0000 (23:48 -0400)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 1 May 2013 14:49:52 +0000 (14:49 +0000)
This is a 64bit arch w/no personalities, so fix printing.
It can now trace a simple call like readahead:
$ cat test.c
main(){readahead(-1, (unsigned long long)1 << 50, 0);}
$ gcc test.c
$ ./strace -ereadahead ./a.out
readahead(-1, 1125899906842624, 0)      = -1 EBADF (Bad file descriptor)

* util.c (printllval): Handle S390X define.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
util.c

diff --git a/util.c b/util.c
index a7661a59a3f026318495d6ff252d0b1c43f308ca..4e21d9f28a33f53421b0e2b22b8f140909d6e122 100644 (file)
--- a/util.c
+++ b/util.c
@@ -201,7 +201,7 @@ printllval(struct tcb *tcp, const char *format, int arg_no)
                tprintf(format, LONG_LONG(tcp->u_arg[arg_no], tcp->u_arg[arg_no + 1]));
                arg_no += 2;
        }
-#elif defined IA64 || defined ALPHA
+#elif defined IA64 || defined ALPHA || defined S390X
        /* Technically, format expects "long long",
         * but we supply "long". We expect that
         * on this arch, they are the same.