diff options
author | Wichert Akkerman <wichert@deephackmode.org> | 1999-06-11 13:18:40 +0000 |
---|---|---|
committer | Wichert Akkerman <wichert@deephackmode.org> | 1999-06-11 13:18:40 +0000 |
commit | 8829a55dc2b13a00be7402f4bf644178a12e9f74 (patch) | |
tree | a60f98a8d5b11f3d9f43498692d2b7cc50ef9038 /mem.c | |
parent | 0405743d6a0f108a45ffd630cce024087bbb726d (diff) | |
download | strace-8829a55dc2b13a00be7402f4bf644178a12e9f74.tar.gz strace-8829a55dc2b13a00be7402f4bf644178a12e9f74.tar.bz2 strace-8829a55dc2b13a00be7402f4bf644178a12e9f74.tar.xz |
Various fixes, see ChangeLog for details
Diffstat (limited to 'mem.c')
-rw-r--r-- | mem.c | 32 |
1 files changed, 31 insertions, 1 deletions
@@ -85,6 +85,33 @@ static struct xlat mmap_flags[] = { #ifdef MAP_NORESERVE { MAP_NORESERVE,"MAP_NORESERVE" }, #endif + /* + * XXX - this was introduced in SunOS 4.x to distinguish between + * the old pre-4.x "mmap()", which: + * + * only let you map devices with an "mmap" routine (e.g., + * frame buffers) in; + * + * required you to specify the mapping address; + * + * returned 0 on success and -1 on failure; + * + * memory and which, and the 4.x "mmap()" which: + * + * can map plain files; + * + * can be asked to pick where to map the file; + * + * returns the address where it mapped the file on success + * and -1 on failure. + * + * It's not actually used in source code that calls "mmap()"; the + * "mmap()" routine adds it for you. + * + * It'd be nice to come up with some way of eliminating it from + * the flags, e.g. reporting calls *without* it as "old_mmap()" + * and calls with it as "mmap()". + */ #ifdef _MAP_NEW { _MAP_NEW, "_MAP_NEW" }, #endif @@ -128,7 +155,10 @@ struct tcb *tcp; #endif /* LINUX && !ALPHA && !sparc */ /* addr */ - tprintf("%#lx, ", u_arg[0]); + if (!u_arg[0]) + tprintf("NULL, "); + else + tprintf("%#lx, ", u_arg[0]); /* len */ tprintf("%lu, ", u_arg[1]); /* prot */ |