[PATCH 1/7] Print NULL for zero address in sys_mmap64
H.J. Lu
hongjiu.lu at intel.com
Fri Feb 3 18:07:42 UTC 2012
Hi,
This patch prints NULL for zero address in sys_mmap64 so that
it is consistent with sys_mmap.
H.J.
---
2012-02-02 H.J. Lu <hongjiu.lu at intel.com>
* mem.c (sys_mmap64): Print NULL for zero address.
diff --git a/mem.c b/mem.c
index e440e9f..7fdd384 100644
--- a/mem.c
+++ b/mem.c
@@ -352,7 +352,10 @@ sys_mmap64(struct tcb *tcp)
return 0;
#endif
/* addr */
- tprintf("%#lx, ", u_arg[0]);
+ if (!u_arg[0])
+ tprints("NULL, ");
+ else
+ tprintf("%#lx, ", u_arg[0]);
/* len */
tprintf("%lu, ", u_arg[1]);
/* prot */
--
1.7.6.5
More information about the Strace-devel
mailing list