diff options
author | Christopher Ferris <cferris@google.com> | 2017-03-23 00:32:40 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-03-23 00:32:40 +0000 |
commit | a06e1c9eefb50791f65fa9d68e5000f5ab9370a6 (patch) | |
tree | cb3542cd4721f35d314bd6b0bf5e4b52aff5e891 /include | |
parent | 6edabc75ab6658554e4d68fa99d0951c191f9185 (diff) | |
parent | f5e568e653d0dd6bccc86d1a60db5a2573f75f0e (diff) | |
download | system_core-a06e1c9eefb50791f65fa9d68e5000f5ab9370a6.tar.gz system_core-a06e1c9eefb50791f65fa9d68e5000f5ab9370a6.tar.bz2 system_core-a06e1c9eefb50791f65fa9d68e5000f5ab9370a6.zip |
Merge "Do not access device maps."
Diffstat (limited to 'include')
-rw-r--r-- | include/backtrace/Backtrace.h | 6 | ||||
-rw-r--r-- | include/backtrace/BacktraceMap.h | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/include/backtrace/Backtrace.h b/include/backtrace/Backtrace.h index c896ab806..4f73a658c 100644 --- a/include/backtrace/Backtrace.h +++ b/include/backtrace/Backtrace.h @@ -104,8 +104,10 @@ public: virtual bool Unwind(size_t num_ignore_frames, ucontext_t* context = NULL) = 0; // Get the function name and offset into the function given the pc. - // If the string is empty, then no valid function name was found. - virtual std::string GetFunctionName(uintptr_t pc, uintptr_t* offset); + // If the string is empty, then no valid function name was found, + // or the pc is not in any valid map. + virtual std::string GetFunctionName(uintptr_t pc, uintptr_t* offset, + const backtrace_map_t* map = NULL); // Fill in the map data associated with the given pc. virtual void FillInMap(uintptr_t pc, backtrace_map_t* map); diff --git a/include/backtrace/BacktraceMap.h b/include/backtrace/BacktraceMap.h index df48dfe2b..8ab0dfabb 100644 --- a/include/backtrace/BacktraceMap.h +++ b/include/backtrace/BacktraceMap.h @@ -33,6 +33,10 @@ #include <string> #include <vector> +// Special flag to indicate a map is in /dev/. However, a map in +// /dev/ashmem/... does not set this flag. +static constexpr int PROT_DEVICE_MAP = 0x8000; + struct backtrace_map_t { uintptr_t start = 0; uintptr_t end = 0; |