diff options
Diffstat (limited to 'contrib/llvm-project/lldb/source/Plugins/ObjectFile/COFF/ObjectFileCOFF.cpp')
| -rw-r--r-- | contrib/llvm-project/lldb/source/Plugins/ObjectFile/COFF/ObjectFileCOFF.cpp | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/contrib/llvm-project/lldb/source/Plugins/ObjectFile/COFF/ObjectFileCOFF.cpp b/contrib/llvm-project/lldb/source/Plugins/ObjectFile/COFF/ObjectFileCOFF.cpp index a7ad5d27b237..1121f696637b 100644 --- a/contrib/llvm-project/lldb/source/Plugins/ObjectFile/COFF/ObjectFileCOFF.cpp +++ b/contrib/llvm-project/lldb/source/Plugins/ObjectFile/COFF/ObjectFileCOFF.cpp @@ -191,19 +191,15 @@ void ObjectFileCOFF::CreateSections(lldb_private::SectionList §ions) { auto SectionType = [](StringRef Name, const coff_section *Section) -> lldb::SectionType { - lldb::SectionType type = - StringSwitch<lldb::SectionType>(Name) - // DWARF Debug Sections - .Case(".debug_abbrev", eSectionTypeDWARFDebugAbbrev) - .Case(".debug_info", eSectionTypeDWARFDebugInfo) - .Case(".debug_line", eSectionTypeDWARFDebugLine) - .Case(".debug_pubnames", eSectionTypeDWARFDebugPubNames) - .Case(".debug_pubtypes", eSectionTypeDWARFDebugPubTypes) - .Case(".debug_str", eSectionTypeDWARFDebugStr) - // CodeView Debug Sections: .debug$S, .debug$T - .StartsWith(".debug$", eSectionTypeDebug) - .Case("clangast", eSectionTypeOther) - .Default(eSectionTypeInvalid); + // DWARF Debug Sections + if (Name.consume_front(".debug_")) + return GetDWARFSectionTypeFromName(Name); + + lldb::SectionType type = StringSwitch<lldb::SectionType>(Name) + // CodeView Debug Sections: .debug$S, .debug$T + .StartsWith(".debug$", eSectionTypeDebug) + .Case("clangast", eSectionTypeOther) + .Default(eSectionTypeInvalid); if (type != eSectionTypeInvalid) return type; |
