[Lldb-commits] [lldb] [lldb] Support dSYMs as modules (PR #77966)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 12 12:54:12 PST 2024


================
@@ -0,0 +1,21 @@
+import os
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+
+
+ at skipUnlessDarwin
+class TargetModuleAddDsymTest(TestBase):
+    @no_debug_info_test
+    def test_target_module_add(self):
+        """Test that you can add a dSYM as a module."""
+        self.build(debug_info="dsym")
+
+        exe_path = self.getBuildArtifact("a.out")
+        dsym_path = exe_path + ".dSYM"
+        sym_path = os.path.join(dsym_path, "Contents", "Resources", "DWARF", "a.out")
+
+        exe = self.getBuildArtifact("a.out")
+        self.dbg.CreateTarget(exe)
----------------
clayborg wrote:

This creates a target with `a.out`, then adds another module which represents the exact same with from withing `a.out.dSYM`. If you build a target like this, and then load the sections in both, then lookups will always find the `a.out` first when resolving addresses. 

https://github.com/llvm/llvm-project/pull/77966


More information about the lldb-commits mailing list