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  <[email protected]>

        * 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


------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Strace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to