[Lldb-commits] [lldb] [LLDB] Expose enumerator for separate-debug-info in SBModule (PR #144119)
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Wed Jun 3 11:49:48 PDT 2026
================
@@ -0,0 +1,43 @@
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+import os, signal, subprocess
+
+from lldbsuite.test import lldbutil
+
+
+class SBModuleSeparateDebugInfoCase(TestBase):
+ def setUp(self):
+ TestBase.setUp(self)
+ self.background_pid = None
+
+ def tearDown(self):
+ TestBase.tearDown(self)
+ if self.background_pid:
+ os.kill(self.background_pid, signal.SIGKILL)
+
+ @skipIf(debug_info=no_match("dwo"))
+ def test_get_separate_debug_info_files_dwo(self):
+ """Test the SBModule::GetSeparateDebugInfoFiles with dwos"""
+ self.build()
+ exe = self.getBuildArtifact("a.out")
+ target = self.dbg.CreateTarget(exe)
+
+ # Target should have a DWO
+ main_module = target.GetModuleAtIndex(0)
+ file_specs = main_module.GetSeparateDebugInfoFiles()
+ self.assertEqual(len(file_specs), 1)
+ self.assertTrue(file_specs[0].GetFileSpec().GetFilename().endswith(".dwo"))
+
+ @skipIf(debug_info=no_match("dwp"))
----------------
clayborg wrote:
You need to test DWARF in .o files. Copy what Ionut did in his patch
https://github.com/llvm/llvm-project/pull/144119
More information about the lldb-commits
mailing list