summaryrefslogtreecommitdiff
path: root/libunwindstack/include/unwindstack
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2018-02-16 13:48:19 -0800
committerChristopher Ferris <cferris@google.com>2018-02-16 14:52:38 -0800
commite0d5d9eada33a5c5a593c6c287b86a93b883000d (patch)
tree91e22bd6c66655325751002a2551a595295d2a59 /libunwindstack/include/unwindstack
parentb333b4dea1b47614a3128bf277bad6228b62a114 (diff)
downloadunwinding-e0d5d9eada33a5c5a593c6c287b86a93b883000d.tar.gz
Modify elf cache to handle elf_offsets properly.
Bug: 73498823 Test: All unit tests pass. Test: Simpleperf run that previously failed, passes now. Change-Id: Iff3a1f2f641a46ab9a0326579af3649f0c76fc65
Diffstat (limited to 'libunwindstack/include/unwindstack')
-rw-r--r--libunwindstack/include/unwindstack/Elf.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/libunwindstack/include/unwindstack/Elf.h b/libunwindstack/include/unwindstack/Elf.h
index a874709..385973e 100644
--- a/libunwindstack/include/unwindstack/Elf.h
+++ b/libunwindstack/include/unwindstack/Elf.h
@@ -23,6 +23,7 @@
#include <mutex>
#include <string>
#include <unordered_map>
+#include <utility>
#include <unwindstack/ElfInterface.h>
#include <unwindstack/Memory.h>
@@ -103,7 +104,8 @@ class Elf {
static void CacheLock();
static void CacheUnlock();
static void CacheAdd(MapInfo* info);
- static bool CacheGet(const std::string& name, std::shared_ptr<Elf>* elf);
+ static bool CacheGet(MapInfo* info);
+ static bool CacheAfterCreateMemory(MapInfo* info);
protected:
bool valid_ = false;
@@ -120,7 +122,7 @@ class Elf {
std::unique_ptr<ElfInterface> gnu_debugdata_interface_;
static bool cache_enabled_;
- static std::unordered_map<std::string, std::shared_ptr<Elf>>* cache_;
+ static std::unordered_map<std::string, std::pair<std::shared_ptr<Elf>, bool>>* cache_;
static std::mutex* cache_lock_;
};