================
@@ -24,41 +30,95 @@ using namespace llvm;
namespace lldb_dap {
-FifoFile::FifoFile(StringRef path) : m_path(path) {}
-
+FifoFile::FifoFile(StringRef path)
+ : m_path(path), m_file(fopen(path.data(), "r+")) {
+ std::error_code EC;
+ if (m_file == nullptr) {
+ EC = std::error_code(errno, std::generic_category());
+ llvm::errs() << "Failed to open fifo file " << path << ": " << EC.message()
+ << "\n";
+ std::terminate();
----------------
SuibianP wrote:
Change to static factory method `FifoFile::create` that returns an
`Expected<FifoFile>`.
https://github.com/llvm/llvm-project/pull/121269
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits