[Lldb-commits] [PATCH] D96237: DWZ 02/08: More support for .gnu_debugaltlink

Jan Kratochvil via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sun Feb 7 21:39:48 PST 2021


jankratochvil created this revision.
jankratochvil added reviewers: labath, clayborg.
jankratochvil added a project: LLDB.
Herald added a subscriber: JDevlieghere.
jankratochvil requested review of this revision.

It was already added by D40468 <https://reviews.llvm.org/D40468> but a few bits were still missing.

All DWZ patches are also applied at: `git clone -b dwz git://git.jankratochvil.net/lldb`
There is a copy: `git clone -b dwz https://github.com/jankratochvil/llvm-project`


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D96237

Files:
  lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp
  lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.h


Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.h
===================================================================
--- lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.h
+++ lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.h
@@ -44,6 +44,7 @@
   SectionData m_data_debug_str_offsets;
   SectionData m_data_debug_tu_index;
   SectionData m_data_debug_types;
+  SectionData m_data_gnu_debug_alt_link;
 
   const DWARFDataExtractor &
   LoadOrGetSection(llvm::Optional<lldb::SectionType> main_section_type,
@@ -73,6 +74,7 @@
   const DWARFDataExtractor &getOrLoadStrData();
   const DWARFDataExtractor &getOrLoadStrOffsetsData();
   const DWARFDataExtractor &getOrLoadDebugTypesData();
+  const DWARFDataExtractor &getOrLoadGNUDebugAltLink();
 
   bool isDwo() { return m_dwo_section_list != nullptr; }
 
Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp
===================================================================
--- lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp
+++ lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp
@@ -123,6 +123,11 @@
                           eSectionTypeDWARFDebugTypesDwo, m_data_debug_types);
 }
 
+const DWARFDataExtractor &DWARFContext::getOrLoadGNUDebugAltLink() {
+  return LoadOrGetSection(eSectionTypeDWARFGNUDebugAltLink, llvm::None,
+                          m_data_gnu_debug_alt_link);
+}
+
 llvm::DWARFContext &DWARFContext::GetAsLLVM() {
   if (!m_llvm_context) {
     llvm::StringMap<std::unique_ptr<llvm::MemoryBuffer>> section_map;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96237.322024.patch
Type: text/x-patch
Size: 1516 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210208/b0c64432/attachment.bin>


More information about the lldb-commits mailing list