[Lldb-commits] [PATCH] D136114: [lldb] Allow SymbolFileDWARFDebugMap to register multiple compile units

Adrian Prantl via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 18 16:30:25 PDT 2022


aprantl added inline comments.


================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp:1270
+      
+        for (auto &cu : m_compile_unit_infos[cu_idx].compile_units_sps)
+          if (cu->GetID() == dwarf_cu.GetID())
----------------
This is technically a O(n^2) algorithm. What do you think about adding a `SmallDenseMap<cu_id, cu_idx>` into compile_unit_infos?


================
Comment at: lldb/test/API/lang/c/full_lto_stepping/TestFullLtoStepping.py:1
+"""Test that types defined in shared libraries work correctly."""
+
----------------
I think this docstring looks copied&pasted?
`test that debugging from object files with multiple compile units works`.




================
Comment at: lldb/test/API/lang/c/full_lto_stepping/TestFullLtoStepping.py:13
+
+    @skipIf(compiler=no_match("clang"))
+    def test(self):
----------------
You might want to mark the test as `@skipUnlessDarwin` since it's about debug maps.


================
Comment at: lldb/test/API/lang/c/full_lto_stepping/TestFullLtoStepping.py:26
+        # Check that we start out in main.
+        self.assertEqual(name, 'main')
+        thread.StepInto()
----------------
If you use `lldbutil.run_to_name_breakpoint` I think you can delete most of the setup code?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136114



More information about the lldb-commits mailing list