Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion lldb/tools/lldb-dap/DAP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
Expand Down
2 changes: 1 addition & 1 deletion lldb/tools/lldb-dap/DAP.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion lldb/tools/lldb-dap/Handler/RequestHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down
4 changes: 2 additions & 2 deletions lldb/tools/lldb-dap/JSONUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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");
Expand Down
16 changes: 8 additions & 8 deletions lldb/tools/lldb-dap/JSONUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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"
Expand Down Expand Up @@ -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
Expand All @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion lldb/tools/lldb-dap/Options.td
Original file line number Diff line number Diff line change
Expand Up @@ -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">,
Expand Down
4 changes: 2 additions & 2 deletions lldb/tools/lldb-dap/RunInTerminal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
10 changes: 5 additions & 5 deletions lldb/tools/lldb-dap/RunInTerminal.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,24 +72,24 @@ 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.
//
/// \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:
Expand Down Expand Up @@ -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();

Expand Down
12 changes: 6 additions & 6 deletions lldb/tools/lldb-dap/lldb-dap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
}
Expand Down
Loading