[Lldb-commits] [lldb] [lldb-dap] IO Handling refactor to support raw input mode. (PR #180858)

John Harrison via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 12 09:48:46 PST 2026


================
@@ -229,18 +221,95 @@ ExceptionBreakpoint *DAP::GetExceptionBreakpoint(const lldb::break_id_t bp_id) {
   return nullptr;
 }
 
+llvm::Expected<std::pair<IOWrapper, IOWrapper>>
+IOWrapper::CreatePseudoTerminal() {
+  // For testing purposes return an error to cause us to fallback to a pair of
+  // pipes.
+  if (getenv("LLDB_DAP_FORCE_REPL_PIPE"))
+    return llvm::createStringError("forced repl pipe");
+
+  lldb_private::PseudoTerminal pty;
+  if (auto err = pty.OpenFirstAvailablePrimary(O_RDWR | O_NOCTTY | O_CLOEXEC))
+    return err;
+  if (auto err = pty.OpenSecondary(O_RDWR | O_NOCTTY | O_CLOEXEC))
+    return err;
----------------
ashgti wrote:

Yea, I noticed that... I guess I'll need to use a different API since that one isn't accessible to us in lldb-dap.

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


More information about the lldb-commits mailing list