summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_procmaps.h
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2013-12-25 08:39:38 +0000
committerAlexey Samsonov <samsonov@google.com>2013-12-25 08:39:38 +0000
commita94c840a7210d2c5aed58e1cc9ea50c1a96cacd2 (patch)
tree8b7075d44c992c80d192f857c87cfd9b015f83c1 /lib/sanitizer_common/sanitizer_procmaps.h
parent13f95364475e0952e2059825bde9c3d707476c7d (diff)
downloadcompiler-rt-a94c840a7210d2c5aed58e1cc9ea50c1a96cacd2.tar.gz
[Sanitizer] Teach MemoryMappingLayout to dump all loaded modules.
Use this to implement GetListOfModules() on Mac and on Android (on Linux we use dl_iterate_phdr). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@198004 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_procmaps.h')
-rw-r--r--lib/sanitizer_common/sanitizer_procmaps.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/sanitizer_common/sanitizer_procmaps.h b/lib/sanitizer_common/sanitizer_procmaps.h
index 7468d6588..73abc5aa9 100644
--- a/lib/sanitizer_common/sanitizer_procmaps.h
+++ b/lib/sanitizer_common/sanitizer_procmaps.h
@@ -14,6 +14,7 @@
#ifndef SANITIZER_PROCMAPS_H
#define SANITIZER_PROCMAPS_H
+#include "sanitizer_common.h"
#include "sanitizer_internal_defs.h"
#include "sanitizer_mutex.h"
@@ -44,6 +45,7 @@ struct ProcSelfMapsBuff {
class MemoryMappingLayout {
public:
explicit MemoryMappingLayout(bool cache_enabled);
+ ~MemoryMappingLayout();
bool Next(uptr *start, uptr *end, uptr *offset,
char filename[], uptr filename_size, uptr *protection);
void Reset();
@@ -56,7 +58,10 @@ class MemoryMappingLayout {
// to obtain the memory mappings. It should fall back to pre-cached data
// instead of aborting.
static void CacheMemoryMappings();
- ~MemoryMappingLayout();
+
+ // Stores the list of mapped objects into an array.
+ uptr DumpListOfModules(LoadedModule *modules, uptr max_modules,
+ string_predicate_t filter);
// Memory protection masks.
static const uptr kProtectionRead = 1;