Decode fifth argument of mremap syscall
* mem.c (sys_mremap): Decode fifth argument.
* linux/*/syscallent.h: Update the number of mremap syscall arguments.
diff --git a/mem.c b/mem.c
index 49abf66..49e3a1c 100644
--- a/mem.c
+++ b/mem.c
@@ -377,13 +377,17 @@
};
int
-sys_mremap(tcp)
-struct tcb *tcp;
+sys_mremap(struct tcb *tcp)
{
if (entering(tcp)) {
tprintf("%#lx, %lu, %lu, ", tcp->u_arg[0], tcp->u_arg[1],
tcp->u_arg[2]);
printflags(mremap_flags, tcp->u_arg[3], "MREMAP_???");
+#ifdef MREMAP_FIXED
+ if ((tcp->u_arg[3] & (MREMAP_MAYMOVE | MREMAP_FIXED)) ==
+ (MREMAP_MAYMOVE | MREMAP_FIXED))
+ tprintf(", %#lx", tcp->u_arg[4]);
+#endif
}
return RVAL_HEX;
}