[Lldb-commits] [lldb] [lldb-dap] Use structured types for stepInTargets request (PR #142439)
John Harrison via lldb-commits
lldb-commits at lists.llvm.org
Tue Jun 3 10:05:25 PDT 2025
================
@@ -78,3 +78,31 @@ def test_basic(self):
leaf_frame = self.dap_server.get_stackFrame()
self.assertIsNotNone(leaf_frame, "expect a leaf frame")
self.assertEqual(step_in_targets[1]["label"], leaf_frame["name"])
+
+ def test_supported_capability(self):
+ program = self.getBuildArtifact("a.out")
+ self.build_and_launch(program)
+ source = "main.cpp"
+ bp_lines = [line_number(source, "// set breakpoint here")]
+ breakpoint_ids = self.set_source_breakpoints(source, bp_lines)
+ self.assertEqual(
+ len(breakpoint_ids), len(bp_lines), "expect correct number of breakpoints"
+ )
+ is_supported = self.dap_server.get_initialize_value(
+ "supportsStepInTargetsRequest"
+ )
+ arch: str = self.getArchitecture()
+ if arch.startswith("x86"):
+ self.assertTrue(
+ is_supported,
+ f"expect capability `stepInTarget` is supported with architecture {arch}",
+ )
+ else:
+ self.assertFalse(
+ is_supported,
+ f"expect capability `stepInTarget` is not supported with architecture {arch}",
+ )
----------------
ashgti wrote:
Yea, basically, we'd expect all the functional tests to only work on x86 targets and the non-x86 targets should only be checking that the capability isn't set after we launch/attach/configurationDone.
https://github.com/llvm/llvm-project/pull/142439
More information about the lldb-commits
mailing list