]> granicus.if.org Git - strace/commit
mem.c: introduce fetch_old_mmap_args
authorEugene Syromyatnikov <evgsyr@gmail.com>
Wed, 17 Jan 2018 01:18:45 +0000 (02:18 +0100)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 17 Jan 2018 04:34:49 +0000 (04:34 +0000)
commit52314cc9a4776f283cf9caa258e56d0b99e01129
treeb9a2347ccaef391a4fdc02aa839db98a7ca0bb0d
parent408ce203da6540a8cd9f36fc65454b1d33ee0ba8
mem.c: introduce fetch_old_mmap_args

Move common old_mmap/old_mmap_pgoff argument fetching code into a
separate function.

As it is, it also fixes the case of non-verbose printing of old_mmap
arguments (see the new test in the next commit).  Also, it is a
preparation for the fix of path tracing for these syscalls.

* defs.h [HAVE_ARCH_OLD_MMAP] (fetch_old_mmap_args): New prototype.
* mem.c [HAVE_ARCH_OLD_MMAP] (fetch_old_mmap_args): New function.
[HAVE_ARCH_OLD_MMAP] (old_mmap, old_mmap_pgoff): Use it.

Fixes: 3db07f11 "Fix old_mmap output when mmap arguments are unfetchable"
Suggested-by: Dmitry V. Levin <ldv@altlinux.org>
defs.h
mem.c