summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_procmaps.h
diff options
context:
space:
mode:
authorViktor Kutuzov <vkutuzov@accesssoftek.com>2014-08-06 10:16:52 +0000
committerViktor Kutuzov <vkutuzov@accesssoftek.com>2014-08-06 10:16:52 +0000
commitc9acc98602d61c4d634f594e5d51aed1f88e0987 (patch)
tree52a70062006e39aaae1e9ad413bb6e9cb87b70b3 /lib/sanitizer_common/sanitizer_procmaps.h
parentf31ccc97cdeccd15470ff98bf8d436df72a1760e (diff)
Segregate FreeBSD-specific parts from sanitizer_procmaps_linux.cc
Differential Revision: http://reviews.llvm.org/D4555 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@214955 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_procmaps.h')
-rw-r--r--lib/sanitizer_common/sanitizer_procmaps.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/sanitizer_common/sanitizer_procmaps.h b/lib/sanitizer_common/sanitizer_procmaps.h
index c59a27c97..94e3871af 100644
--- a/lib/sanitizer_common/sanitizer_procmaps.h
+++ b/lib/sanitizer_common/sanitizer_procmaps.h
@@ -26,6 +26,9 @@ struct ProcSelfMapsBuff {
uptr mmaped_size;
uptr len;
};
+
+// Reads process memory map in an OS-specific way.
+void ReadProcMaps(ProcSelfMapsBuff *proc_maps);
#endif // SANITIZER_FREEBSD || SANITIZER_LINUX
class MemoryMappingLayout {
@@ -57,7 +60,7 @@ class MemoryMappingLayout {
// platform-specific files.
# if SANITIZER_FREEBSD || SANITIZER_LINUX
ProcSelfMapsBuff proc_self_maps_;
- char *current_;
+ const char *current_;
// Static mappings cache.
static ProcSelfMapsBuff cached_proc_self_maps_;
@@ -86,6 +89,11 @@ void GetMemoryProfile(fill_profile_f cb, uptr *stats, uptr stats_size);
// Returns code range for the specified module.
bool GetCodeRangeForFile(const char *module, uptr *start, uptr *end);
+bool IsDecimal(char c);
+uptr ParseDecimal(const char **p);
+bool IsHex(char c);
+uptr ParseHex(const char **p);
+
} // namespace __sanitizer
#endif // SANITIZER_PROCMAPS_H