Skip to content

Fix StartDebuggingRequestHandler/ReplModeRequestHandler in lldb-dap #104824

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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: 0 additions & 2 deletions lldb/tools/lldb-dap/DAP.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,6 @@ struct DAP {
std::mutex call_mutex;
std::map<int /* request_seq */, ResponseCallback /* reply handler */>
inflight_reverse_requests;
StartDebuggingRequestHandler start_debugging_request_handler;
ReplModeRequestHandler repl_mode_request_handler;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw, do you use the REPL mode at meta?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not remember clearly but I think we have hit issues internally because auto REPL mode will perform variables lookup in the background which can trigger very slow performance code path for an internal large target.

ReplMode repl_mode;
std::string command_escape_prefix = "`";
lldb::SBFormat frame_format;
Expand Down
4 changes: 2 additions & 2 deletions lldb/tools/lldb-dap/lldb-dap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1627,12 +1627,12 @@ void request_initialize(const llvm::json::Object &request) {
"lldb-dap", "Commands for managing lldb-dap.");
if (GetBoolean(arguments, "supportsStartDebuggingRequest", false)) {
cmd.AddCommand(
"startDebugging", &g_dap.start_debugging_request_handler,
"startDebugging", new StartDebuggingRequestHandler(),
"Sends a startDebugging request from the debug adapter to the client "
"to start a child debug session of the same type as the caller.");
}
cmd.AddCommand(
"repl-mode", &g_dap.repl_mode_request_handler,
"repl-mode", new ReplModeRequestHandler(),
"Get or set the repl behavior of lldb-dap evaluation requests.");

g_dap.progress_event_thread = std::thread(ProgressEventThreadFunction);
Expand Down
Loading