llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-lldb Author: None (llvmbot) <details> <summary>Changes</summary> Backport 783fbdc54eff8e39457e7116628df8774726ec80 Requested by: @<!-- -->Nerixyz --- Full diff: https://github.com/llvm/llvm-project/pull/176768.diff 2 Files Affected: - (modified) lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp (+4-1) - (modified) lldb/source/Plugins/Process/Windows/Common/ProcessWindows.h (+1) ``````````diff diff --git a/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp b/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp index 127dd0f59e9ae..226cc147aadae 100644 --- a/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp +++ b/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp @@ -214,6 +214,7 @@ Status ProcessWindows::DoLaunch(Module *exe_module, error = LaunchProcess(launch_info, delegate); if (error.Success()) SetID(launch_info.GetProcessID()); + m_pty = launch_info.GetPTYSP(); return error; } @@ -650,8 +651,10 @@ void ProcessWindows::OnExitProcess(uint32_t exit_code) { Log *log = GetLog(WindowsLog::Process); LLDB_LOG(log, "Process {0} exited with code {1}", GetID(), exit_code); + if (m_pty) + m_pty->Close(); + TargetSP target = CalculateTarget(); - target->GetProcessLaunchInfo().GetPTY().Close(); if (target) { ModuleSP executable_module = target->GetExecutableModule(); ModuleList unloaded_modules; diff --git a/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.h b/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.h index 33e4de6b85932..becab6964a4aa 100644 --- a/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.h +++ b/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.h @@ -117,6 +117,7 @@ class ProcessWindows : public Process, public ProcessDebugger { }; std::map<lldb::break_id_t, WatchpointInfo> m_watchpoints; std::vector<lldb::break_id_t> m_watchpoint_ids; + std::shared_ptr<PTY> m_pty; }; } // namespace lldb_private `````````` </details> https://github.com/llvm/llvm-project/pull/176768 _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
