]> granicus.if.org Git - strace/commitdiff
syscall.c: print higher bits of syscall return value on x32 personality
authorEugene Syromyatnikov <evgsyr@gmail.com>
Tue, 6 Feb 2018 23:58:30 +0000 (00:58 +0100)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 7 Feb 2018 22:03:48 +0000 (22:03 +0000)
* syscall.c (syscall_exiting_trace): Check for current_klongsize instead
of current_wordsize to determine the size of tcp->u_rval.

syscall.c

index ce804bf5f33e8371b8e31067b80850ad38c8c730..1450e3d6b85619eebacc60f991d56c2efa2b1c0f 100644 (file)
--- a/syscall.c
+++ b/syscall.c
@@ -916,7 +916,7 @@ syscall_exiting_trace(struct tcb *tcp, struct timeval tv, int res)
                        switch (sys_res & RVAL_MASK) {
                        case RVAL_HEX:
 #if ANY_WORDSIZE_LESS_THAN_KERNEL_LONG
-                               if (current_wordsize < sizeof(tcp->u_rval)) {
+                               if (current_klongsize < sizeof(tcp->u_rval)) {
                                        tprintf("= %#x",
                                                (unsigned int) tcp->u_rval);
                                } else
@@ -931,7 +931,7 @@ syscall_exiting_trace(struct tcb *tcp, struct timeval tv, int res)
                                break;
                        case RVAL_UDECIMAL:
 #if ANY_WORDSIZE_LESS_THAN_KERNEL_LONG
-                               if (current_wordsize < sizeof(tcp->u_rval)) {
+                               if (current_klongsize < sizeof(tcp->u_rval)) {
                                        tprintf("= %u",
                                                (unsigned int) tcp->u_rval);
                                } else