|
1 | | -//===-- lldb-dap.cpp -----------------------------------------*- C++ -*-===// |
| 1 | +//===-- lldb-dap.cpp ------------------------------------------------------===// |
2 | 2 | // |
3 | 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | 4 | // See https://llvm.org/LICENSE.txt for license information. |
|
8 | 8 |
|
9 | 9 | #include "DAP.h" |
10 | 10 | #include "EventHelper.h" |
11 | | -#include "FifoFiles.h" |
12 | 11 | #include "Handler/RequestHandler.h" |
13 | | -#include "JSONUtils.h" |
14 | | -#include "LLDBUtils.h" |
15 | 12 | #include "RunInTerminal.h" |
16 | 13 | #include "lldb/API/SBStream.h" |
17 | 14 | #include "lldb/Host/Config.h" |
|
38 | 35 | #include "llvm/Support/Signals.h" |
39 | 36 | #include "llvm/Support/Threading.h" |
40 | 37 | #include "llvm/Support/raw_ostream.h" |
41 | | -#include <algorithm> |
42 | 38 | #include <condition_variable> |
43 | | -#include <cstdint> |
44 | 39 | #include <cstdio> |
45 | 40 | #include <cstdlib> |
46 | | -#include <cstring> |
47 | 41 | #include <fcntl.h> |
48 | 42 | #include <fstream> |
49 | 43 | #include <map> |
50 | 44 | #include <memory> |
51 | 45 | #include <mutex> |
52 | | -#include <optional> |
53 | | -#include <ostream> |
54 | 46 | #include <string> |
55 | | -#include <sys/stat.h> |
56 | | -#include <sys/types.h> |
57 | 47 | #include <thread> |
58 | 48 | #include <utility> |
59 | 49 | #include <vector> |
@@ -118,8 +108,9 @@ class LLDBDAPOptTable : public llvm::opt::GenericOptTable { |
118 | 108 | : llvm::opt::GenericOptTable(OptionStrTable, OptionPrefixesTable, |
119 | 109 | InfoTable, true) {} |
120 | 110 | }; |
| 111 | +} // anonymous namespace |
121 | 112 |
|
122 | | -void RegisterRequestCallbacks(DAP &dap) { |
| 113 | +static void RegisterRequestCallbacks(DAP &dap) { |
123 | 114 | dap.RegisterRequest<AttachRequestHandler>(); |
124 | 115 | dap.RegisterRequest<BreakpointLocationsRequestHandler>(); |
125 | 116 | dap.RegisterRequest<CompletionsRequestHandler>(); |
@@ -160,9 +151,7 @@ void RegisterRequestCallbacks(DAP &dap) { |
160 | 151 | dap.RegisterRequest<TestGetTargetBreakpointsRequestHandler>(); |
161 | 152 | } |
162 | 153 |
|
163 | | -} // anonymous namespace |
164 | | - |
165 | | -static void printHelp(LLDBDAPOptTable &table, llvm::StringRef tool_name) { |
| 154 | +static void PrintHelp(LLDBDAPOptTable &table, llvm::StringRef tool_name) { |
166 | 155 | std::string usage_str = tool_name.str() + " options"; |
167 | 156 | table.printHelp(llvm::outs(), usage_str.c_str(), "LLDB DAP", false); |
168 | 157 |
|
@@ -433,7 +422,7 @@ int main(int argc, char *argv[]) { |
433 | 422 | llvm::opt::InputArgList input_args = T.ParseArgs(ArgsArr, MAI, MAC); |
434 | 423 |
|
435 | 424 | if (input_args.hasArg(OPT_help)) { |
436 | | - printHelp(T, llvm::sys::path::filename(argv[0])); |
| 425 | + PrintHelp(T, llvm::sys::path::filename(argv[0])); |
437 | 426 | return EXIT_SUCCESS; |
438 | 427 | } |
439 | 428 |
|
|
0 commit comments