diff options
author | David Srbecky <dsrbecky@google.com> | 2021-05-06 14:30:57 +0100 |
---|---|---|
committer | David Srbecky <dsrbecky@google.com> | 2021-05-08 01:05:30 +0000 |
commit | f20cbc9f92a33078a586252938a261edf6aac7c0 (patch) | |
tree | 8cd5a13c0603ce48d757f9415b3271503955efc5 /libunwindstack/DexFiles.cpp | |
parent | c606cf71c464bb32d662ab280113931692041d01 (diff) | |
download | unwinding-f20cbc9f92a33078a586252938a261edf6aac7c0.tar.gz |
Pass DexFile as shared_ptr
Trivial change in preparation for the next CL.
Multiple processes can open the same dex file,
so this is first step to making it shareable.
Test: m libunwindstack_unit_test
Change-Id: I4d053b57fdc97becb7a84767ae3b0d0edaf862ca
Diffstat (limited to 'libunwindstack/DexFiles.cpp')
-rw-r--r-- | libunwindstack/DexFiles.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libunwindstack/DexFiles.cpp b/libunwindstack/DexFiles.cpp index 2a3912b..bc99012 100644 --- a/libunwindstack/DexFiles.cpp +++ b/libunwindstack/DexFiles.cpp @@ -28,7 +28,7 @@ namespace unwindstack { template <> bool GlobalDebugInterface<DexFile>::Load(Maps* maps, std::shared_ptr<Memory>& memory, uint64_t addr, - uint64_t size, /*out*/ std::unique_ptr<DexFile>& dex) { + uint64_t size, /*out*/ std::shared_ptr<DexFile>& dex) { dex = DexFile::Create(addr, size, memory.get(), maps->Find(addr)); return dex.get() != nullptr; } @@ -42,7 +42,7 @@ std::unique_ptr<DexFiles> CreateDexFiles(ArchEnum arch, std::shared_ptr<Memory>& template <> bool GlobalDebugInterface<DexFile>::Load(Maps*, std::shared_ptr<Memory>&, uint64_t, uint64_t, - std::unique_ptr<DexFile>&) { + std::shared_ptr<DexFile>&) { return false; } |