Charles Zablit 71f49eb026
[lldb][windows] release the ConPTY instead of copying its reference (#181811)
When running multiple targets in lldb, the `ProcessLaunchInfo` instance
gets re-used. This is a problem for the ConPTY instance which is owned
by `launch_info` because, when creating a second target, we close and
reopen the `m_pty` of the first target.

This patch replaces the `GetPTYSP` method with `ReleasePTY`, which moves
the `std::shared_ptr` out of `launch_info` instead of creating a new
`std::shared_ptr`. The `m_pty` instance is moved into the target's
process. This way, each target's `Process` instance owns its PTY
instance and is responsible for closing it.

---------

Co-authored-by: Adrian Prantl <adrian.prantl@gmail.com>
2026-02-17 22:10:27 +00:00
..