llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Jonas Devlieghere (JDevlieghere)

<details>
<summary>Changes</summary>

Both spellings are considered correct and acceptable, with adapter being more 
common in American English. Given that DAP stands for Debug Adapter Protocol 
(with an e) let's go with that as the canonical spelling.

---
Full diff: https://github.com/llvm/llvm-project/pull/129110.diff


9 Files Affected:

- (modified) lldb/tools/lldb-dap/DAP.cpp (+1-1) 
- (modified) lldb/tools/lldb-dap/DAP.h (+1-1) 
- (modified) lldb/tools/lldb-dap/Handler/RequestHandler.cpp (+1-1) 
- (modified) lldb/tools/lldb-dap/JSONUtils.cpp (+2-2) 
- (modified) lldb/tools/lldb-dap/JSONUtils.h (+8-8) 
- (modified) lldb/tools/lldb-dap/Options.td (+1-1) 
- (modified) lldb/tools/lldb-dap/RunInTerminal.cpp (+2-2) 
- (modified) lldb/tools/lldb-dap/RunInTerminal.h (+5-5) 
- (modified) lldb/tools/lldb-dap/lldb-dap.cpp (+6-6) 


``````````diff
diff --git a/lldb/tools/lldb-dap/DAP.cpp b/lldb/tools/lldb-dap/DAP.cpp
index cd53e2aca3fb6..53c514b790f38 100644
--- a/lldb/tools/lldb-dap/DAP.cpp
+++ b/lldb/tools/lldb-dap/DAP.cpp
@@ -64,7 +64,7 @@ namespace lldb_dap {
 DAP::DAP(std::string name, llvm::StringRef path, std::ofstream *log,
          lldb::IOObjectSP input, lldb::IOObjectSP output, ReplMode repl_mode,
          std::vector<std::string> pre_init_commands)
-    : name(std::move(name)), debug_adaptor_path(path), log(log),
+    : name(std::move(name)), debug_adapter_path(path), log(log),
       input(std::move(input)), output(std::move(output)),
       broadcaster("lldb-dap"), exception_breakpoints(),
       pre_init_commands(std::move(pre_init_commands)),
diff --git a/lldb/tools/lldb-dap/DAP.h b/lldb/tools/lldb-dap/DAP.h
index a7c7e5d9bbc19..8b2e498a28c95 100644
--- a/lldb/tools/lldb-dap/DAP.h
+++ b/lldb/tools/lldb-dap/DAP.h
@@ -146,7 +146,7 @@ struct SendEventRequestHandler : public 
lldb::SBCommandPluginInterface {
 
 struct DAP {
   std::string name;
-  llvm::StringRef debug_adaptor_path;
+  llvm::StringRef debug_adapter_path;
   std::ofstream *log;
   InputStream input;
   OutputStream output;
diff --git a/lldb/tools/lldb-dap/Handler/RequestHandler.cpp 
b/lldb/tools/lldb-dap/Handler/RequestHandler.cpp
index 0a32e39ea3aff..606ada90ce2e5 100644
--- a/lldb/tools/lldb-dap/Handler/RequestHandler.cpp
+++ b/lldb/tools/lldb-dap/Handler/RequestHandler.cpp
@@ -100,7 +100,7 @@ static llvm::Error RunInTerminal(DAP &dap,
   debugger_pid = getpid();
 #endif
   llvm::json::Object reverse_request = CreateRunInTerminalReverseRequest(
-      launch_request, dap.debug_adaptor_path, comm_file.m_path, debugger_pid);
+      launch_request, dap.debug_adapter_path, comm_file.m_path, debugger_pid);
   dap.SendReverseRequest<LogFailureResponseHandler>("runInTerminal",
                                                     
std::move(reverse_request));
 
diff --git a/lldb/tools/lldb-dap/JSONUtils.cpp 
b/lldb/tools/lldb-dap/JSONUtils.cpp
index 9f08efb2a3ac1..9dec4ca1df49a 100644
--- a/lldb/tools/lldb-dap/JSONUtils.cpp
+++ b/lldb/tools/lldb-dap/JSONUtils.cpp
@@ -1436,7 +1436,7 @@ llvm::json::Value CreateCompileUnit(lldb::SBCompileUnit 
&unit) {
 /// 
https://microsoft.github.io/debug-adapter-protocol/specification#Reverse_Requests_RunInTerminal
 llvm::json::Object
 CreateRunInTerminalReverseRequest(const llvm::json::Object &launch_request,
-                                  llvm::StringRef debug_adaptor_path,
+                                  llvm::StringRef debug_adapter_path,
                                   llvm::StringRef comm_file,
                                   lldb::pid_t debugger_pid) {
   llvm::json::Object run_in_terminal_args;
@@ -1446,7 +1446,7 @@ CreateRunInTerminalReverseRequest(const 
llvm::json::Object &launch_request,
 
   const auto *launch_request_arguments = launch_request.getObject("arguments");
   // The program path must be the first entry in the "args" field
-  std::vector<std::string> args = {debug_adaptor_path.str(), "--comm-file",
+  std::vector<std::string> args = {debug_adapter_path.str(), "--comm-file",
                                    comm_file.str()};
   if (debugger_pid != LLDB_INVALID_PROCESS_ID) {
     args.push_back("--debugger-pid");
diff --git a/lldb/tools/lldb-dap/JSONUtils.h b/lldb/tools/lldb-dap/JSONUtils.h
index db56d98777347..55d2360e0a224 100644
--- a/lldb/tools/lldb-dap/JSONUtils.h
+++ b/lldb/tools/lldb-dap/JSONUtils.h
@@ -233,7 +233,7 @@ void AppendBreakpoint(
     std::optional<llvm::StringRef> request_path = std::nullopt,
     std::optional<uint32_t> request_line = std::nullopt);
 
-/// Converts breakpoint location to a debug adaptor protocol "Breakpoint".
+/// Converts breakpoint location to a debug adapter protocol "Breakpoint".
 ///
 /// \param[in] bp
 ///     A LLDB breakpoint object to convert into a JSON value
@@ -290,7 +290,7 @@ llvm::json::Value CreateModule(lldb::SBTarget &target, 
lldb::SBModule &module);
 llvm::json::Object CreateEventObject(const llvm::StringRef event_name);
 
 /// Create a "ExceptionBreakpointsFilter" JSON object as described in
-/// the debug adaptor definition.
+/// the debug adapter definition.
 ///
 /// \param[in] bp
 ///     The exception breakpoint object to use
@@ -301,7 +301,7 @@ llvm::json::Object CreateEventObject(const llvm::StringRef 
event_name);
 llvm::json::Value
 CreateExceptionBreakpointFilter(const ExceptionBreakpoint &bp);
 
-/// Create a "Scope" JSON object as described in the debug adaptor definition.
+/// Create a "Scope" JSON object as described in the debug adapter definition.
 ///
 /// \param[in] name
 ///     The value to place into the "name" key
@@ -322,7 +322,7 @@ llvm::json::Value CreateScope(const llvm::StringRef name,
                               int64_t variablesReference,
                               int64_t namedVariables, bool expensive);
 
-/// Create a "Source" JSON object as described in the debug adaptor definition.
+/// Create a "Source" JSON object as described in the debug adapter definition.
 ///
 /// \param[in] file
 ///     The SBFileSpec to use when populating out the "Source" object
@@ -332,7 +332,7 @@ llvm::json::Value CreateScope(const llvm::StringRef name,
 ///     definition outlined by Microsoft.
 llvm::json::Value CreateSource(const lldb::SBFileSpec &file);
 
-/// Create a "Source" JSON object as described in the debug adaptor definition.
+/// Create a "Source" JSON object as described in the debug adapter definition.
 ///
 /// \param[in] line_entry
 ///     The LLDB line table to use when populating out the "Source"
@@ -573,8 +573,8 @@ llvm::json::Value CreateCompileUnit(lldb::SBCompileUnit 
&unit);
 ///     The original launch_request object whose fields are used to construct
 ///     the reverse request object.
 ///
-/// \param[in] debug_adaptor_path
-///     Path to the current debug adaptor. It will be used to delegate the
+/// \param[in] debug_adapter_path
+///     Path to the current debug adapter. It will be used to delegate the
 ///     launch of the target.
 ///
 /// \param[in] comm_file
@@ -590,7 +590,7 @@ llvm::json::Value CreateCompileUnit(lldb::SBCompileUnit 
&unit);
 ///     Microsoft.
 llvm::json::Object
 CreateRunInTerminalReverseRequest(const llvm::json::Object &launch_request,
-                                  llvm::StringRef debug_adaptor_path,
+                                  llvm::StringRef debug_adapter_path,
                                   llvm::StringRef comm_file,
                                   lldb::pid_t debugger_pid);
 
diff --git a/lldb/tools/lldb-dap/Options.td b/lldb/tools/lldb-dap/Options.td
index 97a6ec118c47b..a1baf2f0370bd 100644
--- a/lldb/tools/lldb-dap/Options.td
+++ b/lldb/tools/lldb-dap/Options.td
@@ -33,7 +33,7 @@ def launch_target: S<"launch-target">,
 
 def comm_file: S<"comm-file">,
   MetaVarName<"<file>">,
-  HelpText<"The fifo file used to communicate the with the debug adaptor "
+  HelpText<"The fifo file used to communicate the with the debug adapter "
     "when using --launch-target.">;
 
 def debugger_pid: S<"debugger-pid">,
diff --git a/lldb/tools/lldb-dap/RunInTerminal.cpp 
b/lldb/tools/lldb-dap/RunInTerminal.cpp
index 4fe09e2885a8e..9f309dd78221a 100644
--- a/lldb/tools/lldb-dap/RunInTerminal.cpp
+++ b/lldb/tools/lldb-dap/RunInTerminal.cpp
@@ -97,9 +97,9 @@ static Error ToError(const RunInTerminalMessage &message) {
 
 RunInTerminalLauncherCommChannel::RunInTerminalLauncherCommChannel(
     StringRef comm_file)
-    : m_io(comm_file, "debug adaptor") {}
+    : m_io(comm_file, "debug adapter") {}
 
-Error RunInTerminalLauncherCommChannel::WaitUntilDebugAdaptorAttaches(
+Error RunInTerminalLauncherCommChannel::WaitUntilDebugAdapterAttaches(
     std::chrono::milliseconds timeout) {
   if (Expected<RunInTerminalMessageUP> message =
           GetNextMessage(m_io, timeout)) {
diff --git a/lldb/tools/lldb-dap/RunInTerminal.h 
b/lldb/tools/lldb-dap/RunInTerminal.h
index b20f8beb6071d..457850c8ea538 100644
--- a/lldb/tools/lldb-dap/RunInTerminal.h
+++ b/lldb/tools/lldb-dap/RunInTerminal.h
@@ -72,7 +72,7 @@ class RunInTerminalLauncherCommChannel {
 public:
   RunInTerminalLauncherCommChannel(llvm::StringRef comm_file);
 
-  /// Wait until the debug adaptor attaches.
+  /// Wait until the debug adapter attaches.
   ///
   /// \param[in] timeout
   ///     How long to wait to be attached.
@@ -80,16 +80,16 @@ class RunInTerminalLauncherCommChannel {
   /// \return
   ///     An \a llvm::Error object in case of errors or if this operation times
   ///     out.
-  llvm::Error WaitUntilDebugAdaptorAttaches(std::chrono::milliseconds timeout);
+  llvm::Error WaitUntilDebugAdapterAttaches(std::chrono::milliseconds timeout);
 
-  /// Notify the debug adaptor this process' pid.
+  /// Notify the debug adapter this process' pid.
   ///
   /// \return
   ///     An \a llvm::Error object in case of errors or if this operation times
   ///     out.
   llvm::Error NotifyPid();
 
-  /// Notify the debug adaptor that there's been an error.
+  /// Notify the debug adapter that there's been an error.
   void NotifyError(llvm::StringRef error);
 
 private:
@@ -122,7 +122,7 @@ class RunInTerminalDebugAdapterCommChannel {
   FifoFileIO m_io;
 };
 
-/// Create a fifo file used to communicate the debug adaptor with
+/// Create a fifo file used to communicate the debug adapter with
 /// the runInTerminal launcher.
 llvm::Expected<std::shared_ptr<FifoFile>> CreateRunInTerminalCommFile();
 
diff --git a/lldb/tools/lldb-dap/lldb-dap.cpp b/lldb/tools/lldb-dap/lldb-dap.cpp
index 6dff960daede9..d005eccfae903 100644
--- a/lldb/tools/lldb-dap/lldb-dap.cpp
+++ b/lldb/tools/lldb-dap/lldb-dap.cpp
@@ -175,22 +175,22 @@ static void PrintHelp(LLDBDAPOptTable &table, 
llvm::StringRef tool_name) {
 // If --launch-target is provided, this instance of lldb-dap becomes a
 // runInTerminal launcher. It will ultimately launch the program specified in
 // the --launch-target argument, which is the original program the user wanted
-// to debug. This is done in such a way that the actual debug adaptor can
+// to debug. This is done in such a way that the actual debug adapter can
 // place breakpoints at the beginning of the program.
 //
-// The launcher will communicate with the debug adaptor using a fifo file in 
the
+// The launcher will communicate with the debug adapter using a fifo file in 
the
 // directory specified in the --comm-file argument.
 //
-// Regarding the actual flow, this launcher will first notify the debug adaptor
+// Regarding the actual flow, this launcher will first notify the debug adapter
 // of its pid. Then, the launcher will be in a pending state waiting to be
-// attached by the adaptor.
+// attached by the adapter.
 //
 // Once attached and resumed, the launcher will exec and become the program
 // specified by --launch-target, which is the original target the
 // user wanted to run.
 //
 // In case of errors launching the target, a suitable error message will be
-// emitted to the debug adaptor.
+// emitted to the debug adapter.
 static llvm::Error LaunchRunInTerminalTarget(llvm::opt::Arg &target_arg,
                                              llvm::StringRef comm_file,
                                              lldb::pid_t debugger_pid,
@@ -219,7 +219,7 @@ static llvm::Error LaunchRunInTerminalTarget(llvm::opt::Arg 
&target_arg,
   const char *timeout_env_var = getenv("LLDB_DAP_RIT_TIMEOUT_IN_MS");
   int timeout_in_ms =
       timeout_env_var != nullptr ? atoi(timeout_env_var) : 20000;
-  if (llvm::Error err = comm_channel.WaitUntilDebugAdaptorAttaches(
+  if (llvm::Error err = comm_channel.WaitUntilDebugAdapterAttaches(
           std::chrono::milliseconds(timeout_in_ms))) {
     return err;
   }

``````````

</details>


https://github.com/llvm/llvm-project/pull/129110
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to