[Lldb-commits] [lldb] [lldb] convert jit-loader_rtdyld_elf.test to an API test (PR #170333)

Charles Zablit via lldb-commits lldb-commits at lists.llvm.org
Tue Dec 9 08:41:15 PST 2025


================
@@ -0,0 +1,55 @@
+"""
+Test that pending breakpoints resolve for JITted code with mcjit and rtdyld.
+"""
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+
+import shutil
+
+
+class TestJitBreakpoint(TestBase):
+    def setUp(self):
+        TestBase.setUp(self)
+        self.ll = self.getBuildArtifact("jitbp.ll")
+
+    @skipUnlessArch("x86_64")
+    @expectedFailureAll(oslist=["windows"])
+    def test_jit_breakpoints(self):
+        self.build()
+        self.do_test("--jit-kind=mcjit")
+        self.do_test("--jit-linker=rtdyld")
+
+    def do_test(self, jit_flag: str):
+        self.dbg.SetAsync(False)
+
+        self.dbg.HandleCommand("settings set plugin.jit-loader.gdb.enable on")
+
+        lldb_dir = os.path.dirname(lldbtest_config.lldbExec)
+        lli_path = shutil.which("lli", path=lldb_dir)
+        self.assertTrue(os.path.exists(lli_path), "lli not found")
----------------
charles-zablit wrote:

I have replaced the whole invocation with `self.runCmd("target create lli", CURRENT_EXECUTABLE_SET)`. This is what we were doing in the shell version of the test.

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


More information about the lldb-commits mailing list