[Lldb-commits] [lldb] [lldb] Synchronize Debugger's stdout and stderr at the StreamFile level (PR #126630)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Tue Feb 11 02:32:53 PST 2025


================
@@ -52,6 +52,39 @@ class StreamFile : public Stream {
   const StreamFile &operator=(const StreamFile &) = delete;
 };
 
+class SynchronizedStreamFile : public StreamFile {
+public:
+  SynchronizedStreamFile(uint32_t flags, uint32_t addr_size,
+                         lldb::ByteOrder byte_order)
+      : StreamFile(flags, addr_size, byte_order) {}
+
+  SynchronizedStreamFile(int fd, bool transfer_ownership)
+      : StreamFile(fd, transfer_ownership) {}
+
+  SynchronizedStreamFile(
+      const char *path, File::OpenOptions options,
+      uint32_t permissions = lldb::eFilePermissionsFileDefault)
+      : StreamFile(path, options, permissions) {}
+
+  SynchronizedStreamFile(FILE *fh, bool transfer_ownership)
+      : StreamFile(fh, transfer_ownership) {}
+
+  SynchronizedStreamFile(std::shared_ptr<File> file) : StreamFile(file) {}
----------------
labath wrote:

```suggestion
  using StreamFile::StreamFile;
```

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


More information about the lldb-commits mailing list