From f3fbd1c0586ff6ec7895991e6c28f61a503c36a8 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 23 Jul 2016 20:50:09 +0000 Subject: Vendor import of lldb release_39 branch r276489: https://llvm.org/svn/llvm-project/lldb/branches/release_39@276489 --- source/Plugins/ObjectFile/ELF/ObjectFileELF.h | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'source/Plugins/ObjectFile/ELF/ObjectFileELF.h') diff --git a/source/Plugins/ObjectFile/ELF/ObjectFileELF.h b/source/Plugins/ObjectFile/ELF/ObjectFileELF.h index 4b97f92c6c5c..e2f73f53ec63 100644 --- a/source/Plugins/ObjectFile/ELF/ObjectFileELF.h +++ b/source/Plugins/ObjectFile/ELF/ObjectFileELF.h @@ -14,6 +14,7 @@ #include // C++ Includes +#include #include // Other libraries and framework includes @@ -56,7 +57,7 @@ struct ELFNote size_t GetByteSize() const { - return 12 + llvm::RoundUpToAlignment (n_namesz, 4) + llvm::RoundUpToAlignment (n_descsz, 4); + return 12 + llvm::alignTo (n_namesz, 4) + llvm::alignTo (n_descsz, 4); } }; @@ -149,9 +150,6 @@ public: lldb_private::Symtab * GetSymtab() override; - lldb_private::Symbol * - ResolveSymbolForAddress(const lldb_private::Address& so_addr, bool verify_unique) override; - bool IsStripped () override; @@ -231,6 +229,7 @@ private: typedef DynamicSymbolColl::const_iterator DynamicSymbolCollConstIter; typedef std::map FileAddressToAddressClassMap; + typedef std::function SetDataFunction; /// Version of this reader common to all plugins based on this class. static const uint32_t m_plugin_version = 1; @@ -279,7 +278,7 @@ private: // Parses the ELF program headers. static size_t GetProgramHeaderInfo(ProgramHeaderColl &program_headers, - lldb_private::DataExtractor &data, + const SetDataFunction &set_data, const elf::ELFHeader &header); // Finds PT_NOTE segments and calculates their crc sum. @@ -299,10 +298,14 @@ private: size_t ParseSectionHeaders(); + static void + ParseARMAttributes(lldb_private::DataExtractor &data, uint64_t length, + lldb_private::ArchSpec &arch_spec); + /// Parses the elf section headers and returns the uuid, debug link name, crc, archspec. static size_t GetSectionHeaderInfo(SectionHeaderColl §ion_headers, - lldb_private::DataExtractor &data, + const SetDataFunction &set_data, const elf::ELFHeader &header, lldb_private::UUID &uuid, std::string &gnu_debuglink_file, @@ -347,6 +350,10 @@ private: const ELFSectionHeaderInfo *rela_hdr, lldb::user_id_t section_id); + void + ParseUnwindSymbols(lldb_private::Symtab *symbol_table, + lldb_private::DWARFCallFrameInfo* eh_frame); + /// Relocates debug sections unsigned RelocateDebugSections(const elf::ELFSectionHeader *rel_hdr, lldb::user_id_t rel_id); @@ -437,6 +444,13 @@ private: static lldb_private::Error RefineModuleDetailsFromNote (lldb_private::DataExtractor &data, lldb_private::ArchSpec &arch_spec, lldb_private::UUID &uuid); + + + static lldb::offset_t + SetData(const lldb_private::DataExtractor &src, lldb_private::DataExtractor &dst, lldb::offset_t offset, lldb::offset_t length); + + lldb::offset_t + SetDataWithReadMemoryFallback(lldb_private::DataExtractor &dst, lldb::offset_t offset, lldb::offset_t length); }; #endif // liblldb_ObjectFileELF_h_ -- cgit v1.2.3