]> granicus.if.org Git - strace/commitdiff
kcmp: print index parameters of unknown commands as kernel_ulong_t
authorDmitry V. Levin <ldv@altlinux.org>
Thu, 27 Oct 2016 22:44:08 +0000 (22:44 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 28 Oct 2016 18:40:10 +0000 (18:40 +0000)
* lookup_dcookie.c (SYS_FUNC(kcmp)): Use getarg_ull to retrieve idx1
and idx2, print them using %#llx format in case of unknown command.

kcmp.c

diff --git a/kcmp.c b/kcmp.c
index aec494a33f3eea308b1b1e0e39c0a7b985a2ec0f..4668b48f11d44e951372eb19c5420015223414ed 100644 (file)
--- a/kcmp.c
+++ b/kcmp.c
@@ -33,8 +33,8 @@ SYS_FUNC(kcmp)
        pid_t pid1 = tcp->u_arg[0];
        pid_t pid2 = tcp->u_arg[1];
        int type = tcp->u_arg[2];
-       unsigned long idx1 = tcp->u_arg[3];
-       unsigned long idx2 = tcp->u_arg[4];
+       unsigned long long idx1 = getarg_ull(tcp, 3);
+       unsigned long long idx2 = getarg_ull(tcp, 4);
 
        tprintf("%d, %d, ", pid1, pid2);
        printxval(kcmp_types, type, "KCMP_???");
@@ -51,7 +51,7 @@ SYS_FUNC(kcmp)
                case KCMP_VM:
                        break;
                default:
-                       tprintf(", %#lx, %#lx", idx1, idx2);
+                       tprintf(", %#llx, %#llx", idx1, idx2);
        }
 
        return RVAL_DECODED;