|
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" |
|
23 | 20 | #include "lldb/lldb-forward.h" |
24 | 21 | #include "llvm/ADT/ArrayRef.h" |
25 | 22 | #include "llvm/ADT/ScopeExit.h" |
26 | | -#include "llvm/ADT/StringExtras.h" |
27 | 23 | #include "llvm/ADT/StringRef.h" |
28 | 24 | #include "llvm/Option/Arg.h" |
29 | 25 | #include "llvm/Option/ArgList.h" |
|
37 | 33 | #include "llvm/Support/Signals.h" |
38 | 34 | #include "llvm/Support/Threading.h" |
39 | 35 | #include "llvm/Support/raw_ostream.h" |
40 | | -#include <algorithm> |
41 | 36 | #include <condition_variable> |
42 | | -#include <cstdint> |
43 | 37 | #include <cstdio> |
44 | 38 | #include <cstdlib> |
45 | | -#include <cstring> |
46 | 39 | #include <fcntl.h> |
47 | 40 | #include <fstream> |
48 | 41 | #include <map> |
49 | 42 | #include <memory> |
50 | 43 | #include <mutex> |
51 | | -#include <optional> |
52 | | -#include <ostream> |
53 | 44 | #include <string> |
54 | | -#include <sys/stat.h> |
55 | | -#include <sys/types.h> |
56 | 45 | #include <thread> |
57 | 46 | #include <utility> |
58 | 47 | #include <vector> |
@@ -113,8 +102,9 @@ class LLDBDAPOptTable : public llvm::opt::GenericOptTable { |
113 | 102 | : llvm::opt::GenericOptTable(OptionStrTable, OptionPrefixesTable, |
114 | 103 | InfoTable, true) {} |
115 | 104 | }; |
| 105 | +} // anonymous namespace |
116 | 106 |
|
117 | | -void RegisterRequestCallbacks(DAP &dap) { |
| 107 | +static void RegisterRequestCallbacks(DAP &dap) { |
118 | 108 | dap.RegisterRequest<AttachRequestHandler>(); |
119 | 109 | dap.RegisterRequest<BreakpointLocationsRequestHandler>(); |
120 | 110 | dap.RegisterRequest<CompletionsRequestHandler>(); |
@@ -155,9 +145,7 @@ void RegisterRequestCallbacks(DAP &dap) { |
155 | 145 | dap.RegisterRequest<TestGetTargetBreakpointsRequestHandler>(); |
156 | 146 | } |
157 | 147 |
|
158 | | -} // anonymous namespace |
159 | | - |
160 | | -static void printHelp(LLDBDAPOptTable &table, llvm::StringRef tool_name) { |
| 148 | +static void PrintHelp(LLDBDAPOptTable &table, llvm::StringRef tool_name) { |
161 | 149 | std::string usage_str = tool_name.str() + " options"; |
162 | 150 | table.printHelp(llvm::outs(), usage_str.c_str(), "LLDB DAP", false); |
163 | 151 |
|
@@ -433,7 +421,7 @@ int main(int argc, char *argv[]) { |
433 | 421 | llvm::opt::InputArgList input_args = T.ParseArgs(ArgsArr, MAI, MAC); |
434 | 422 |
|
435 | 423 | if (input_args.hasArg(OPT_help)) { |
436 | | - printHelp(T, llvm::sys::path::filename(argv[0])); |
| 424 | + PrintHelp(T, llvm::sys::path::filename(argv[0])); |
437 | 425 | return EXIT_SUCCESS; |
438 | 426 | } |
439 | 427 |
|
|
0 commit comments