[LLDB] - Implement the support for the .debug_loclists section.

This implements the support for .debug_loclists section, which is
DWARF 5 version of .debug_loc.

Currently, clang is able to emit it with the use of D53365.

Differential revision: https://reviews.llvm.org/D53436

llvm-svn: 345016
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
index 2958503..d7ca18c 100644
--- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -1790,6 +1790,7 @@
       static ConstString g_sect_name_dwarf_debug_line(".debug_line");
       static ConstString g_sect_name_dwarf_debug_line_str(".debug_line_str");
       static ConstString g_sect_name_dwarf_debug_loc(".debug_loc");
+      static ConstString g_sect_name_dwarf_debug_loclists(".debug_loclists");
       static ConstString g_sect_name_dwarf_debug_macinfo(".debug_macinfo");
       static ConstString g_sect_name_dwarf_debug_macro(".debug_macro");
       static ConstString g_sect_name_dwarf_debug_names(".debug_names");
@@ -1807,6 +1808,7 @@
       static ConstString g_sect_name_dwarf_debug_line_str_dwo(".debug_line_str.dwo");
       static ConstString g_sect_name_dwarf_debug_macro_dwo(".debug_macro.dwo");
       static ConstString g_sect_name_dwarf_debug_loc_dwo(".debug_loc.dwo");
+      static ConstString g_sect_name_dwarf_debug_loclists_dwo(".debug_loclists.dwo");
       static ConstString g_sect_name_dwarf_debug_str_dwo(".debug_str.dwo");
       static ConstString g_sect_name_dwarf_debug_str_offsets_dwo(
           ".debug_str_offsets.dwo");
@@ -1868,6 +1870,8 @@
         sect_type = eSectionTypeDWARFDebugLineStr;
       else if (name == g_sect_name_dwarf_debug_loc)
         sect_type = eSectionTypeDWARFDebugLoc;
+      else if (name == g_sect_name_dwarf_debug_loclists)
+        sect_type = eSectionTypeDWARFDebugLocLists;
       else if (name == g_sect_name_dwarf_debug_macinfo)
         sect_type = eSectionTypeDWARFDebugMacInfo;
       else if (name == g_sect_name_dwarf_debug_macro)
@@ -1900,6 +1904,8 @@
         sect_type = eSectionTypeDWARFDebugMacro;
       else if (name == g_sect_name_dwarf_debug_loc_dwo)
         sect_type = eSectionTypeDWARFDebugLoc;
+      else if (name == g_sect_name_dwarf_debug_loclists_dwo)
+        sect_type = eSectionTypeDWARFDebugLocLists;
       else if (name == g_sect_name_dwarf_debug_str_dwo)
         sect_type = eSectionTypeDWARFDebugStr;
       else if (name == g_sect_name_dwarf_debug_str_offsets_dwo)
diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index 3550476..e2939f4 100644
--- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -1199,6 +1199,7 @@
           case eSectionTypeDWARFDebugLine:
           case eSectionTypeDWARFDebugLineStr:
           case eSectionTypeDWARFDebugLoc:
+          case eSectionTypeDWARFDebugLocLists:
           case eSectionTypeDWARFDebugMacInfo:
           case eSectionTypeDWARFDebugMacro:
           case eSectionTypeDWARFDebugNames:
@@ -1457,6 +1458,7 @@
   static ConstString g_sect_name_dwarf_debug_info("__debug_info");
   static ConstString g_sect_name_dwarf_debug_line("__debug_line");
   static ConstString g_sect_name_dwarf_debug_loc("__debug_loc");
+  static ConstString g_sect_name_dwarf_debug_loclists("__debug_loclists");
   static ConstString g_sect_name_dwarf_debug_macinfo("__debug_macinfo");
   static ConstString g_sect_name_dwarf_debug_names("__debug_names");
   static ConstString g_sect_name_dwarf_debug_pubnames("__debug_pubnames");
@@ -1486,6 +1488,8 @@
     return eSectionTypeDWARFDebugLine;
   if (section_name == g_sect_name_dwarf_debug_loc)
     return eSectionTypeDWARFDebugLoc;
+  if (section_name == g_sect_name_dwarf_debug_loclists)
+    return eSectionTypeDWARFDebugLocLists;
   if (section_name == g_sect_name_dwarf_debug_macinfo)
     return eSectionTypeDWARFDebugMacInfo;
   if (section_name == g_sect_name_dwarf_debug_names)
diff --git a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
index b2967f1..4063757 100644
--- a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
+++ b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
@@ -691,6 +691,7 @@
         static ConstString g_sect_name_dwarf_debug_info(".debug_info");
         static ConstString g_sect_name_dwarf_debug_line(".debug_line");
         static ConstString g_sect_name_dwarf_debug_loc(".debug_loc");
+        static ConstString g_sect_name_dwarf_debug_loclists(".debug_loclists");
         static ConstString g_sect_name_dwarf_debug_macinfo(".debug_macinfo");
         static ConstString g_sect_name_dwarf_debug_names(".debug_names");
         static ConstString g_sect_name_dwarf_debug_pubnames(".debug_pubnames");
@@ -736,6 +737,8 @@
           section_type = eSectionTypeDWARFDebugLine;
         else if (const_sect_name == g_sect_name_dwarf_debug_loc)
           section_type = eSectionTypeDWARFDebugLoc;
+        else if (const_sect_name == g_sect_name_dwarf_debug_loclists)
+          section_type = eSectionTypeDWARFDebugLocLists;
         else if (const_sect_name == g_sect_name_dwarf_debug_macinfo)
           section_type = eSectionTypeDWARFDebugMacInfo;
         else if (const_sect_name == g_sect_name_dwarf_debug_names)