]> granicus.if.org Git - strace/commitdiff
x32: fix printllval-based decoders of i386 syscalls
authorDmitry V. Levin <ldv@altlinux.org>
Thu, 2 May 2013 08:41:27 +0000 (08:41 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 2 May 2013 08:45:42 +0000 (08:45 +0000)
* util.c (printllval) [X32]: Handle i386 personality.

util.c

diff --git a/util.c b/util.c
index 4e21d9f28a33f53421b0e2b22b8f140909d6e122..e00c9a6496ff8bbe135d51939455a25703d38aed 100644 (file)
--- a/util.c
+++ b/util.c
@@ -208,7 +208,15 @@ printllval(struct tcb *tcp, const char *format, int arg_no)
         */
        tprintf(format, tcp->u_arg[arg_no]);
        arg_no++;
-#elif defined LINUX_MIPSN32 || defined X32
+#elif defined X32
+       if (current_personality == 0) {
+               tprintf(format, tcp->ext_arg[arg_no]);
+               arg_no++;
+       } else {
+               tprintf(format, LONG_LONG(tcp->u_arg[arg_no], tcp->u_arg[arg_no + 1]));
+               arg_no += 2;
+       }
+#elif defined LINUX_MIPSN32
        tprintf(format, tcp->ext_arg[arg_no]);
        arg_no++;
 #else