Currently, all request handlers are implemented as free functions in lldb-dap.cpp. That file has grown to over 5000 lines and is starting to become hard to maintain. This PR moves the request handlers into their own class (and file), together with their documentation. This PR migrates about a third of the request handlers and the rest will be migrated in subsequent commits. I'm merging this in an incomplete state because almost any lldb-dap change is going to result in merge conflicts and migrating request handlers one by one is easier to review.
34 lines
912 B
C++
34 lines
912 B
C++
//===-- EventHelper.h -----------------------------------------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLDB_TOOLS_LLDB_DAP_EVENTHELPER_H
|
|
#define LLDB_TOOLS_LLDB_DAP_EVENTHELPER_H
|
|
|
|
#include "DAPForward.h"
|
|
|
|
namespace lldb_dap {
|
|
struct DAP;
|
|
|
|
enum LaunchMethod { Launch, Attach, AttachForSuspendedLaunch };
|
|
|
|
void SendProcessEvent(DAP &dap, LaunchMethod launch_method);
|
|
|
|
void SendThreadStoppedEvent(DAP &dap);
|
|
|
|
void SendTerminatedEvent(DAP &dap);
|
|
|
|
void SendStdOutStdErr(DAP &dap, lldb::SBProcess &process);
|
|
|
|
void SendContinuedEvent(DAP &dap);
|
|
|
|
void SendProcessExitedEvent(DAP &dap, lldb::SBProcess &process);
|
|
|
|
} // namespace lldb_dap
|
|
|
|
#endif
|