diff options
author | Sandeep Patil <sspatil@google.com> | 2019-01-30 17:43:22 -0800 |
---|---|---|
committer | Sandeep Patil <sspatil@google.com> | 2019-02-11 01:38:08 +0000 |
commit | f31c70989b78ca40bda969195a4c92a1060789d5 (patch) | |
tree | f9912f626a2a03256324419a56efd3df10ffb3c1 /libmemunreachable | |
parent | c6a2d7d5cd1e6ce36a19220c3922c5673c7b4ac5 (diff) | |
download | system_core-f31c70989b78ca40bda969195a4c92a1060789d5.tar.gz system_core-f31c70989b78ca40bda969195a4c92a1060789d5.tar.bz2 system_core-f31c70989b78ca40bda969195a4c92a1060789d5.zip |
procinfo: Read inode number from /proc/<pid>/maps
Adjust all callbacks to include the inode number as well.
Fixes: 123532375
Test: libprocinfo_test
Test: libdmabufinfo_test
Test: libmeminfo_test
Change-Id: I71fd75d90d5ee44585011c5ae654a1dd7e185458
Signed-off-by: Sandeep Patil <sspatil@google.com>
Diffstat (limited to 'libmemunreachable')
-rw-r--r-- | libmemunreachable/ProcessMappings.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libmemunreachable/ProcessMappings.cpp b/libmemunreachable/ProcessMappings.cpp index 701ce1670..8e1be4c8c 100644 --- a/libmemunreachable/ProcessMappings.cpp +++ b/libmemunreachable/ProcessMappings.cpp @@ -18,6 +18,7 @@ #include <fcntl.h> #include <inttypes.h> #include <string.h> +#include <sys/types.h> #include <unistd.h> #include <android-base/unique_fd.h> @@ -30,7 +31,8 @@ namespace android { struct ReadMapCallback { ReadMapCallback(allocator::vector<Mapping>& mappings) : mappings_(mappings) {} - void operator()(uint64_t start, uint64_t end, uint16_t flags, uint64_t, const char* name) const { + void operator()(uint64_t start, uint64_t end, uint16_t flags, uint64_t, ino_t, + const char* name) const { mappings_.emplace_back(start, end, flags & PROT_READ, flags & PROT_WRITE, flags & PROT_EXEC, name); } |