[Lldb-commits] [lldb] [llvm] [lldb-dap] Add unknown request handler (PR #181109)

Ebuka Ezike via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 12 04:23:46 PST 2026


================
@@ -849,15 +849,11 @@ bool DAP::HandleObject(const Message &M) {
     auto handler_pos = request_handlers.find(req->command);
     dispatcher.Set("client_data",
                    llvm::Twine("request_command:", req->command).str());
-    if (handler_pos != request_handlers.end()) {
+    if (handler_pos != request_handlers.end())
       handler_pos->second->Run(*req);
-      return true; // Success
-    }
-
-    dispatcher.Set("error",
-                   llvm::Twine("unhandled-command:" + req->command).str());
-    DAP_LOG(log, "error: unhandled command '{0}'", req->command);
-    return false; // Fail
+    else
+      unknown_request_handler->Run(*req);
----------------
da-viper wrote:

```suggestion
      UnknownRequestHandler handler(*this);
      handler.BaseRequestHandler::Run(*req);
```
I don't think this needs to be a member variable we can just handle it here. something like 

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


More information about the lldb-commits mailing list