Add a global elf cache.
Bug: 65682279
Test: Ran new unit tests.
Change-Id: I19c64614b2b11a27f58204d4cc34913c02e04c36
diff --git a/libunwindstack/tests/MapInfoGetLoadBiasTest.cpp b/libunwindstack/tests/MapInfoGetLoadBiasTest.cpp
index 631036b..7e64a8a 100644
--- a/libunwindstack/tests/MapInfoGetLoadBiasTest.cpp
+++ b/libunwindstack/tests/MapInfoGetLoadBiasTest.cpp
@@ -69,7 +69,7 @@
}
TEST_F(MapInfoGetLoadBiasTest, load_bias_cached_from_elf) {
- map_info_->elf = elf_container_.release();
+ map_info_->elf.reset(elf_container_.release());
elf_->FakeSetLoadBias(0);
EXPECT_EQ(0U, map_info_->GetLoadBias(process_memory_));
@@ -79,7 +79,7 @@
}
TEST_F(MapInfoGetLoadBiasTest, elf_exists) {
- map_info_->elf = elf_container_.release();
+ map_info_->elf.reset(elf_container_.release());
elf_->FakeSetLoadBias(0);
EXPECT_EQ(0U, map_info_->GetLoadBias(process_memory_));
@@ -122,7 +122,7 @@
}
TEST_F(MapInfoGetLoadBiasTest, multiple_thread_elf_exists) {
- map_info_->elf = elf_container_.release();
+ map_info_->elf.reset(elf_container_.release());
elf_->FakeSetLoadBias(0x1000);
MultipleThreadTest(0x1000);