Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 5 additions & 17 deletions lldb/tools/lldb-dap/lldb-dap.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===-- lldb-dap.cpp -----------------------------------------*- C++ -*-===//
//===-- lldb-dap.cpp ------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
Expand All @@ -8,10 +8,7 @@

#include "DAP.h"
#include "EventHelper.h"
#include "FifoFiles.h"
#include "Handler/RequestHandler.h"
#include "JSONUtils.h"
#include "LLDBUtils.h"
#include "RunInTerminal.h"
#include "lldb/API/SBStream.h"
#include "lldb/Host/Config.h"
Expand All @@ -23,7 +20,6 @@
#include "lldb/lldb-forward.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Option/Arg.h"
#include "llvm/Option/ArgList.h"
Expand All @@ -37,22 +33,15 @@
#include "llvm/Support/Signals.h"
#include "llvm/Support/Threading.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <condition_variable>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fcntl.h>
#include <fstream>
#include <map>
#include <memory>
#include <mutex>
#include <optional>
#include <ostream>
#include <string>
#include <sys/stat.h>
#include <sys/types.h>
#include <thread>
#include <utility>
#include <vector>
Expand Down Expand Up @@ -113,8 +102,9 @@ class LLDBDAPOptTable : public llvm::opt::GenericOptTable {
: llvm::opt::GenericOptTable(OptionStrTable, OptionPrefixesTable,
InfoTable, true) {}
};
} // anonymous namespace

void RegisterRequestCallbacks(DAP &dap) {
static void RegisterRequestCallbacks(DAP &dap) {
dap.RegisterRequest<AttachRequestHandler>();
dap.RegisterRequest<BreakpointLocationsRequestHandler>();
dap.RegisterRequest<CompletionsRequestHandler>();
Expand Down Expand Up @@ -155,9 +145,7 @@ void RegisterRequestCallbacks(DAP &dap) {
dap.RegisterRequest<TestGetTargetBreakpointsRequestHandler>();
}

} // anonymous namespace

static void printHelp(LLDBDAPOptTable &table, llvm::StringRef tool_name) {
static void PrintHelp(LLDBDAPOptTable &table, llvm::StringRef tool_name) {
std::string usage_str = tool_name.str() + " options";
table.printHelp(llvm::outs(), usage_str.c_str(), "LLDB DAP", false);

Expand Down Expand Up @@ -433,7 +421,7 @@ int main(int argc, char *argv[]) {
llvm::opt::InputArgList input_args = T.ParseArgs(ArgsArr, MAI, MAC);

if (input_args.hasArg(OPT_help)) {
printHelp(T, llvm::sys::path::filename(argv[0]));
PrintHelp(T, llvm::sys::path::filename(argv[0]));
return EXIT_SUCCESS;
}

Expand Down
Loading