================
@@ -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
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to