[Lldb-commits] [lldb] [llvm] [lldb][windows] add Windows Virtual Console support (PR #168729)

Saleem Abdulrasool via lldb-commits lldb-commits at lists.llvm.org
Tue Dec 16 12:48:10 PST 2025


================
@@ -118,7 +122,15 @@ class ProcessLaunchInfo : public ProcessInfo {
 
   bool MonitorProcess() const;
 
-  PseudoTerminal &GetPTY() { return *m_pty; }
+#ifdef _WIN32
+  PseudoConsole &GetPTY() const { return *m_pty; }
+
+  std::shared_ptr<PseudoConsole> GetPTYSP() const { return m_pty; }
+#else
+  PseudoTerminal &GetPTY() const { return *m_pty; }
+
+  std::shared_ptr<PseudoTerminal> GetPTYSP() const { return m_pty; }
+#endif
----------------
compnerd wrote:

Rather than doing this, can we do something slightly different and use a typealias? Something like this should work:

```c++
#if defined(_WIN32)
using PTY = PsuedoConsole;
#else
using PTY = PsuedoTerminal;
#endif

PTY &GetPTY() { return *m_pty; }
std::shared_ptr<PTY> GetPTYSP() const { return m_pty; }
```

https://github.com/llvm/llvm-project/pull/168729


More information about the lldb-commits mailing list