[Lldb-commits] [PATCH] D72917: [lldb/DWARF] Change how we construct a llvm::DWARFContext

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jan 20 02:53:35 PST 2020


labath marked an inline comment as done.
labath added inline comments.


================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp:130
 
-    if (m_main_section_list) {
-      for (auto &section : *m_main_section_list)
-        AddSection(*section);
-    }
-
-    if (m_dwo_section_list) {
-      for (auto &section : *m_dwo_section_list)
-        AddSection(*section);
-    }
+    AddSection("debug_line_str", getOrLoadLineStrData());
 
----------------
aprantl wrote:
> This will also work on Darwin where the section names are slightly different (shorter)?
This is correct, because this constructor of llvm::DWARFContext uses the generic DWARF section names (cf. DWARFObjInMemory::mapSectionToMember). In fact, this was not correct before because that function would not recognize macho-style __debug_line_str (it did work for for elf because we manually stripped the leading `.`).

However, this still won't be enough to make macho work because ObjectFileMachO is missing the code to recognise debug_line_str in ObjectFileMachO.cpp:GetSectionType (at least, that's the first problem I ran into).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72917/new/

https://reviews.llvm.org/D72917





More information about the lldb-commits mailing list