linux-user: factor out reading of /proc/self/maps
commit01ef6b9e4e4e84b106b7f934354eada8fe36674f
authorAlex Bennée <alex.bennee@linaro.org>
Fri, 3 Apr 2020 19:11:46 +0000 (3 20:11 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Tue, 7 Apr 2020 15:19:49 +0000 (7 16:19 +0100)
tree12b6462e1b1d098771ee2a9ffa580b9c9f42e0bc
parent2f311075b7a74124098effc72290767b02869561
linux-user: factor out reading of /proc/self/maps

Unfortunately reading /proc/self/maps is still considered the gold
standard for a process finding out about it's own memory layout. As we
will want this data in other contexts soon factor out the code to read
and parse the data. Rather than just blindly copying the existing
sscanf based code we use a more modern glib version of the parsing
code to make a more general purpose map structure.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20200403191150.863-9-alex.bennee@linaro.org>
include/qemu/selfmap.h [new file with mode: 0644]
linux-user/syscall.c
util/Makefile.objs
util/selfmap.c [new file with mode: 0644]