From ecfaf4801cd0cc85fdced820110652f0281765fa Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Thu, 14 Jul 2022 10:12:48 -0700 Subject: [lldb] Remove ELF .zdebug support clang 14 removed -gz=zlib-gnu support and ld.lld/llvm-objcopy removed zlib-gnu support recently. Remove lldb support by migrating away from llvm::object::Decompressor::isCompressedELFSection. The API has another user llvm-dwp, so it is not removed in this patch. Reviewed By: labath Differential Revision: https://reviews.llvm.org/D129724 --- lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp') diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp index f9fb368..122298d 100644 --- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp +++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp @@ -1607,7 +1607,7 @@ lldb::user_id_t ObjectFileELF::GetSectionIndexByName(const char *name) { } static SectionType GetSectionTypeFromName(llvm::StringRef Name) { - if (Name.consume_front(".debug_") || Name.consume_front(".zdebug_")) { + if (Name.consume_front(".debug_")) { return llvm::StringSwitch(Name) .Case("abbrev", eSectionTypeDWARFDebugAbbrev) .Case("abbrev.dwo", eSectionTypeDWARFDebugAbbrevDwo) @@ -3365,8 +3365,7 @@ size_t ObjectFileELF::ReadSectionData(Section *section, return section->GetObjectFile()->ReadSectionData(section, section_data); size_t result = ObjectFile::ReadSectionData(section, section_data); - if (result == 0 || !llvm::object::Decompressor::isCompressedELFSection( - section->Get(), section->GetName().GetStringRef())) + if (result == 0 || !(section->Get() & llvm::ELF::SHF_COMPRESSED)) return result; auto Decompressor = llvm::object::Decompressor::create( -- cgit v1.1