augusto2112 created this revision. augusto2112 added reviewers: aprantl, JDevlieghere. augusto2112 requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits.
Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D120578 Files: lldb/include/lldb/Symbol/ObjectFile.h lldb/source/Symbol/ObjectFile.cpp Index: lldb/source/Symbol/ObjectFile.cpp =================================================================== --- lldb/source/Symbol/ObjectFile.cpp +++ lldb/source/Symbol/ObjectFile.cpp @@ -553,6 +553,13 @@ section_data); } +const char * +ObjectFile::GetCStrFromSection(Section *section, + lldb::offset_t section_offset) const { + offset_t offset = section->GetOffset() + section_offset; + return m_data.GetCStr(&offset); +} + bool ObjectFile::SplitArchivePathWithObject(llvm::StringRef path_with_object, FileSpec &archive_file, ConstString &archive_object, Index: lldb/include/lldb/Symbol/ObjectFile.h =================================================================== --- lldb/include/lldb/Symbol/ObjectFile.h +++ lldb/include/lldb/Symbol/ObjectFile.h @@ -673,6 +673,9 @@ virtual size_t ReadSectionData(Section *section, DataExtractor §ion_data); + const char *GetCStrFromSection(Section *section, + lldb::offset_t section_offset) const; + bool IsInMemory() const { return m_memory_addr != LLDB_INVALID_ADDRESS; } // Strip linker annotations (such as @@VERSION) from symbol names.
Index: lldb/source/Symbol/ObjectFile.cpp =================================================================== --- lldb/source/Symbol/ObjectFile.cpp +++ lldb/source/Symbol/ObjectFile.cpp @@ -553,6 +553,13 @@ section_data); } +const char * +ObjectFile::GetCStrFromSection(Section *section, + lldb::offset_t section_offset) const { + offset_t offset = section->GetOffset() + section_offset; + return m_data.GetCStr(&offset); +} + bool ObjectFile::SplitArchivePathWithObject(llvm::StringRef path_with_object, FileSpec &archive_file, ConstString &archive_object, Index: lldb/include/lldb/Symbol/ObjectFile.h =================================================================== --- lldb/include/lldb/Symbol/ObjectFile.h +++ lldb/include/lldb/Symbol/ObjectFile.h @@ -673,6 +673,9 @@ virtual size_t ReadSectionData(Section *section, DataExtractor §ion_data); + const char *GetCStrFromSection(Section *section, + lldb::offset_t section_offset) const; + bool IsInMemory() const { return m_memory_addr != LLDB_INVALID_ADDRESS; } // Strip linker annotations (such as @@VERSION) from symbol names.
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits