================
@@ -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;
----------------
da-viper wrote:
This crashes on linux, because the function assumes we already have initialised
the filesystem instance.
https://github.com/llvm/llvm-project/pull/180858
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits