diff options
author | Christopher Ferris <cferris@google.com> | 2018-02-16 13:48:19 -0800 |
---|---|---|
committer | Christopher Ferris <cferris@google.com> | 2018-02-16 14:52:38 -0800 |
commit | d9575b668bd122f1ad80767bc36024e4571ffeb0 (patch) | |
tree | 6d52a08b98a3f1c429fbba400b71193d4e3bb510 /libunwindstack/include/unwindstack | |
parent | 76eda07ff6bacb5972bec7f59f0d36ac076028ec (diff) | |
download | system_core-d9575b668bd122f1ad80767bc36024e4571ffeb0.tar.gz system_core-d9575b668bd122f1ad80767bc36024e4571ffeb0.tar.bz2 system_core-d9575b668bd122f1ad80767bc36024e4571ffeb0.zip |
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.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libunwindstack/include/unwindstack/Elf.h b/libunwindstack/include/unwindstack/Elf.h index a874709d2..385973e9f 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_; }; |