summaryrefslogtreecommitdiff
path: root/libbacktrace/include/backtrace
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2018-02-20 13:58:40 -0800
committerChristopher Ferris <cferris@google.com>2018-02-20 17:10:23 -0800
commit92f03291e14c9995f0d396b2260bd983ed547627 (patch)
treed89fa3248e1f6bf2bb768a97b9d67edaeafe00c2 /libbacktrace/include/backtrace
parentef6ed54d365f987977ef9726af34e89f3e3ec8c9 (diff)
downloadunwinding-92f03291e14c9995f0d396b2260bd983ed547627.tar.gz
Add ability to skip function name resolution.
Bug: 73558129 Test: New unit tests pass. Change-Id: I3a6b17d2590aacb367ab3e3a51cc85be73ad64eb
Diffstat (limited to 'libbacktrace/include/backtrace')
-rw-r--r--libbacktrace/include/backtrace/BacktraceMap.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/libbacktrace/include/backtrace/BacktraceMap.h b/libbacktrace/include/backtrace/BacktraceMap.h
index 7b26079..da54472 100644
--- a/libbacktrace/include/backtrace/BacktraceMap.h
+++ b/libbacktrace/include/backtrace/BacktraceMap.h
@@ -154,6 +154,13 @@ public:
const std::vector<std::string>& GetSuffixesToIgnore() { return suffixes_to_ignore_; }
+ // Disabling the resolving of names results in the function name being
+ // set to an empty string and the function offset being set to zero
+ // in the frame data when unwinding.
+ void SetResolveNames(bool resolve) { resolve_names_ = resolve; }
+
+ bool ResolveNames() { return resolve_names_; }
+
protected:
BacktraceMap(pid_t pid);
@@ -164,6 +171,7 @@ public:
pid_t pid_;
std::deque<backtrace_map_t> maps_;
std::vector<std::string> suffixes_to_ignore_;
+ bool resolve_names_ = true;
};
class ScopedBacktraceMapIteratorLock {