llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-lldb Author: John Harrison (ashgti) <details> <summary>Changes</summary> When we restart a process, send an updated 'process' event describing the newly launched process. I also updated the `isLocalProcess` value based on if we're on the 'host' platform or not. --- Full diff: https://github.com/llvm/llvm-project/pull/163833.diff 2 Files Affected: - (modified) lldb/tools/lldb-dap/EventHelper.cpp (+4-1) - (modified) lldb/tools/lldb-dap/Handler/RestartRequestHandler.cpp (+2) ``````````diff diff --git a/lldb/tools/lldb-dap/EventHelper.cpp b/lldb/tools/lldb-dap/EventHelper.cpp index 2b9ed229405a8..ebddb4ec1f502 100644 --- a/lldb/tools/lldb-dap/EventHelper.cpp +++ b/lldb/tools/lldb-dap/EventHelper.cpp @@ -15,6 +15,7 @@ #include "Protocol/ProtocolRequests.h" #include "Protocol/ProtocolTypes.h" #include "lldb/API/SBFileSpec.h" +#include "lldb/API/SBPlatform.h" #include "llvm/Support/Error.h" #include <utility> @@ -136,7 +137,9 @@ void SendProcessEvent(DAP &dap, LaunchMethod launch_method) { EmplaceSafeString(body, "name", exe_path); const auto pid = dap.target.GetProcess().GetProcessID(); body.try_emplace("systemProcessId", (int64_t)pid); - body.try_emplace("isLocalProcess", true); + body.try_emplace("isLocalProcess", + dap.target.GetPlatform().GetName() == + lldb::SBPlatform::GetHostPlatform().GetName()); const char *startMethod = nullptr; switch (launch_method) { case Launch: diff --git a/lldb/tools/lldb-dap/Handler/RestartRequestHandler.cpp b/lldb/tools/lldb-dap/Handler/RestartRequestHandler.cpp index 45dd7ddce0428..706e66fd643a3 100644 --- a/lldb/tools/lldb-dap/Handler/RestartRequestHandler.cpp +++ b/lldb/tools/lldb-dap/Handler/RestartRequestHandler.cpp @@ -124,6 +124,8 @@ void RestartRequestHandler::operator()( return; } + SendProcessEvent(dap, Attach); + // This is normally done after receiving a "configuration done" request. // Because we're restarting, configuration has already happened so we can // continue the process right away. `````````` </details> https://github.com/llvm/llvm-project/pull/163833 _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
