@@ -68,7 +68,6 @@ enum DAPBroadcasterBits {
6868 eBroadcastBitStopProgressThread = 1u << 1
6969};
7070
71- typedef void (*RequestCallback)(DAP &dap, const llvm::json::Object &command);
7271typedef void (*ResponseCallback)(llvm::Expected<llvm::json::Value> value);
7372
7473enum class PacketStatus {
@@ -190,8 +189,7 @@ struct DAP {
190189 // the old process here so we can detect this case and keep running.
191190 lldb::pid_t restarting_process_id;
192191 bool configuration_done_sent;
193- std::map<std::string, RequestCallback, std::less<>> request_handlers;
194- llvm::StringMap<std::unique_ptr<RequestHandler>> new_request_handlers;
192+ llvm::StringMap<std::unique_ptr<RequestHandler>> request_handlers;
195193 bool waiting_for_run_in_terminal;
196194 ProgressEventReporter progress_event_reporter;
197195 // Keep track of the last stop thread index IDs as threads won't go away
@@ -309,8 +307,6 @@ struct DAP {
309307 // / listeing for its breakpoint events.
310308 void SetTarget (const lldb::SBTarget target);
311309
312- const std::map<std::string, RequestCallback> &GetRequestHandlers ();
313-
314310 PacketStatus GetNextObject (llvm::json::Object &object);
315311 bool HandleObject (const llvm::json::Object &object);
316312
@@ -338,21 +334,9 @@ struct DAP {
338334 void SendReverseRequest (llvm::StringRef command, llvm::json::Value arguments,
339335 ResponseCallback callback);
340336
341- // / Registers a callback handler for a Debug Adapter Protocol request
342- // /
343- // / \param[in] request
344- // / The name of the request following the Debug Adapter Protocol
345- // / specification.
346- // /
347- // / \param[in] callback
348- // / The callback to execute when the given request is triggered by the
349- // / IDE.
350- void RegisterRequestCallback (std::string request, RequestCallback callback);
351-
352337 // / Registers a request handler.
353338 template <typename Handler> void RegisterRequest () {
354- new_request_handlers[Handler::getCommand ()] =
355- std::make_unique<Handler>(*this );
339+ request_handlers[Handler::getCommand ()] = std::make_unique<Handler>(*this );
356340 }
357341
358342 // / Debuggee will continue from stopped state.
0 commit comments