Author: dlav-sc Date: 2024-07-19T13:22:18+02:00 New Revision: fdfc49186318727653cf6b13686bb77cfed60e33
URL: https://github.com/llvm/llvm-project/commit/fdfc49186318727653cf6b13686bb77cfed60e33 DIFF: https://github.com/llvm/llvm-project/commit/fdfc49186318727653cf6b13686bb77cfed60e33.diff LOG: [lldb] SHT_NOBITS sections type (#99044) .sbss section was recognized as eSectionTypeOther, but has to be eSectionTypeZeroFill. Fixed tests for RISCV target: TestClassLoadingViaMemberTypedef.TestCase TestClassTemplateNonTypeParameterPack.TestCaseClassTemplateNonTypeParameterPack TestThreadSelectionBug.TestThreadSelectionBug lldbsuite.test.lldbtest.TestOffsetof lldbsuite.test.lldbtest.TestOffsetofCpp TestTargetDumpTypeSystem.TestCase TestCPP11EnumTypes.CPP11EnumTypesTestCase TestCppIsTypeComplete.TestCase TestExprCrash.ExprCrashTestCase TestDebugIndexCache.DebugIndexCacheTestcase Added: Modified: lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Removed: ################################################################################ diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp index 51bd34e95c77d..890db5c274814 100644 --- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp +++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp @@ -1696,7 +1696,6 @@ static SectionType GetSectionTypeFromName(llvm::StringRef Name) { return llvm::StringSwitch<SectionType>(Name) .Case(".ARM.exidx", eSectionTypeARMexidx) .Case(".ARM.extab", eSectionTypeARMextab) - .Cases(".bss", ".tbss", eSectionTypeZeroFill) .Case(".ctf", eSectionTypeDebug) .Cases(".data", ".tdata", eSectionTypeData) .Case(".eh_frame", eSectionTypeEHFrame) @@ -1713,6 +1712,10 @@ SectionType ObjectFileELF::GetSectionType(const ELFSectionHeaderInfo &H) const { if (H.sh_flags & SHF_EXECINSTR) return eSectionTypeCode; break; + case SHT_NOBITS: + if (H.sh_flags & SHF_ALLOC) + return eSectionTypeZeroFill; + break; case SHT_SYMTAB: return eSectionTypeELFSymbolTable; case SHT_DYNSYM: _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits