[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:02:57 PDT 2025


================
@@ -414,6 +415,34 @@ bool fromJSON(const llvm::json::Value &, SteppingGranularity &,
               llvm::json::Path);
 llvm::json::Value toJSON(const SteppingGranularity &);
 
+/// A `StepInTarget` can be used in the `stepIn` request and determines into
+/// which single target the `stepIn` request should step.
+struct StepInTarget {
+  /// Unique identifier for a step-in target.
+  uint64_t id = LLDB_INVALID_ADDRESS;
+
+  /// The name of the step-in target (shown in the UI).
+  std::string label;
+
+  /// The line of the step-in target.
+  std::optional<uint64_t> line;
+
+  /// Start position of the range covered by the step in target. It is measured
+  /// in UTF-16 code units and the client capability `columnsStartAt1`
+  /// determines whether it is 0- or 1-based.
+  std::optional<uint64_t> column;
+
+  /// The end line of the range covered by the step-in target.
+  std::optional<uint64_t> endLine;
+
+  /// End position of the range covered by the step in target. It is measured in
+  /// UTF-16 code units and the client capability `columnsStartAt1` determines
+  /// whether it is 0- or 1-based.
+  std::optional<uint64_t> endColumn;
----------------
ashgti wrote:

Sorry, I didn't fully finish the thought. When we convert this into json in the `toJSON` we can check if they're equal to the invalid value and not send the value.

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


More information about the lldb-commits mailing list