diff --git a/lldb/source/Utility/ReproducerInstrumentation.cpp b/lldb/source/Utility/ReproducerInstrumentation.cpp index 473786ef4d3e..0b74acaacb7e 100644 --- a/lldb/source/Utility/ReproducerInstrumentation.cpp +++ b/lldb/source/Utility/ReproducerInstrumentation.cpp @@ -8,6 +8,7 @@ #include "lldb/Utility/ReproducerInstrumentation.h" #include "lldb/Utility/Reproducer.h" +#include using namespace lldb_private; using namespace lldb_private::repro; @@ -47,6 +48,10 @@ bool Registry::Replay(llvm::StringRef buffer) { Log *log = GetLogIfAllCategoriesSet(LIBLLDB_LOG_API); #endif + // Disable buffering stdout so that we approximate the way things get flushed + // during an interactive session. + setvbuf(stdout, nullptr, _IONBF, 0); + Deserializer deserializer(buffer); while (deserializer.HasData(1)) { unsigned id = deserializer.Deserialize();