[Lldb-commits] [lldb] [lldb-dap] Refactor stepping related request handlers (NFC) (PR #128453)

John Harrison via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 24 11:34:23 PST 2025


================
@@ -225,4 +225,11 @@ void RequestHandler::PrintWelcomeMessage() {
 #endif
 }
 
+bool RequestHandler::HasInstructionGranularity(
+    const llvm::json::Object &request) {
+  if (std::optional<llvm::StringRef> value = request.getString("granularity"))
+    return value == "instruction";
+  return false;
+}
----------------
ashgti wrote:

Can we change the name of the parameter to `arguments`?

We shouldn't check the request itself, but the arguments, e.g. the request would be formatted like:
```json
{
  "type": "request",
  "command": "next",
  "seq": 1,
  "arguments": {
    "granularity": "instruction"
  }
}
```

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


More information about the lldb-commits mailing list