diff options
author | Christopher Ferris <cferris@google.com> | 2019-03-14 15:40:59 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2019-03-14 15:40:59 +0000 |
commit | 4886a5bd5942275c20fa95df3ccb03e70a97328c (patch) | |
tree | 8c40e397a05578712906cb0e546a77d9799f0dd1 /libunwindstack/include/unwindstack/ElfInterface.h | |
parent | ff3c13f52f1d223a4aa2904234867e6199643766 (diff) | |
parent | 02a6c448c32c37aae834bc25e92db97bfac32524 (diff) |
Merge "Add support for displaying soname in an apk."
Diffstat (limited to 'libunwindstack/include/unwindstack/ElfInterface.h')
-rw-r--r-- | libunwindstack/include/unwindstack/ElfInterface.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/libunwindstack/include/unwindstack/ElfInterface.h b/libunwindstack/include/unwindstack/ElfInterface.h index d41bb13e3..dbd917d67 100644 --- a/libunwindstack/include/unwindstack/ElfInterface.h +++ b/libunwindstack/include/unwindstack/ElfInterface.h @@ -56,7 +56,7 @@ class ElfInterface { virtual void InitHeaders(uint64_t load_bias) = 0; - virtual bool GetSoname(std::string* name) = 0; + virtual std::string GetSoname() = 0; virtual bool GetFunctionName(uint64_t addr, std::string* name, uint64_t* offset) = 0; @@ -117,7 +117,7 @@ class ElfInterface { void ReadSectionHeaders(const EhdrType& ehdr); template <typename DynType> - bool GetSonameWithTemplate(std::string* soname); + std::string GetSonameWithTemplate(); template <typename SymType> bool GetFunctionNameWithTemplate(uint64_t addr, std::string* name, uint64_t* func_offset); @@ -183,9 +183,7 @@ class ElfInterface32 : public ElfInterface { ElfInterface::InitHeadersWithTemplate<uint32_t>(load_bias); } - bool GetSoname(std::string* soname) override { - return ElfInterface::GetSonameWithTemplate<Elf32_Dyn>(soname); - } + std::string GetSoname() override { return ElfInterface::GetSonameWithTemplate<Elf32_Dyn>(); } bool GetFunctionName(uint64_t addr, std::string* name, uint64_t* func_offset) override { return ElfInterface::GetFunctionNameWithTemplate<Elf32_Sym>(addr, name, func_offset); @@ -215,9 +213,7 @@ class ElfInterface64 : public ElfInterface { ElfInterface::InitHeadersWithTemplate<uint64_t>(load_bias); } - bool GetSoname(std::string* soname) override { - return ElfInterface::GetSonameWithTemplate<Elf64_Dyn>(soname); - } + std::string GetSoname() override { return ElfInterface::GetSonameWithTemplate<Elf64_Dyn>(); } bool GetFunctionName(uint64_t addr, std::string* name, uint64_t* func_offset) override { return ElfInterface::GetFunctionNameWithTemplate<Elf64_Sym>(addr, name, func_offset); |