diff options
Diffstat (limited to 'libunwindstack/Symbols.h')
-rw-r--r-- | libunwindstack/Symbols.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libunwindstack/Symbols.h b/libunwindstack/Symbols.h index 97c03c2..1074ebf 100644 --- a/libunwindstack/Symbols.h +++ b/libunwindstack/Symbols.h @@ -23,6 +23,8 @@ #include <optional> #include <string> +#include <unwindstack/SharedString.h> + namespace unwindstack { // Forward declaration. @@ -30,9 +32,9 @@ class Memory; class Symbols { struct Info { - uint64_t addr; // Symbol address. + uint32_t size; // Symbol size in bytes. uint32_t index; // Index into *sorted* symbol table. - uint32_t name; // Offset in .strtab, or 0 if the symbol is not a function. + SharedString name; }; public: @@ -41,7 +43,7 @@ class Symbols { virtual ~Symbols() = default; template <typename SymType> - bool GetName(uint64_t addr, Memory* elf_memory, std::string* name, uint64_t* func_offset); + bool GetName(uint64_t addr, Memory* elf_memory, SharedString* name, uint64_t* func_offset); template <typename SymType> bool GetGlobal(Memory* elf_memory, const std::string& name, uint64_t* memory_address); @@ -53,7 +55,7 @@ class Symbols { private: template <typename SymType, bool RemapIndices> - const Info* BinarySearch(uint64_t addr, Memory* elf_memory); + Info* BinarySearch(uint64_t addr, Memory* elf_memory, uint64_t* func_offset); template <typename SymType> void BuildRemapTable(Memory* elf_memory); |