common: add scoped_mmap
authorMarkus Metzger <markus.t.metzger@intel.com>
Fri, 26 Jan 2018 12:57:48 +0000 (13:57 +0100)
committerMarkus Metzger <markus.t.metzger@intel.com>
Fri, 9 Feb 2018 13:03:19 +0000 (14:03 +0100)
commit84696f37ae92280ded0e6600074ad8bc518255fa
tree6a1c68789c554bbcdd2dd71b918612dc3c394141
parentea4a0888120dec61348cae460ffa08de663e2852
common: add scoped_mmap

Add a simple helper to automatically unmap a memory mapping.

gdb/
* common/scoped_mmap.h: New.
* unittests/scoped_mmap-selftest.c: New.
* Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
unittests/scoped_mmap-selftest.c.
gdb/ChangeLog
gdb/Makefile.in
gdb/common/scoped_mmap.h [new file with mode: 0644]
gdb/unittests/scoped_mmap-selftests.c [new file with mode: 0644]