From: Jonas Devlieghere Date: Wed, 8 May 2019 21:07:19 +0000 (+0000) Subject: [Reproducers] Flush files to disk periodically X-Git-Tag: llvmorg-10-init~5968 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a1d0efa2e3ac6bf2ce780a8da6d0d11f9b32d2d1;p=platform%2Fupstream%2Fllvm.git [Reproducers] Flush files to disk periodically Periodically flush some of the data to disk. Although not perfect, this helps when the debugger crashes. llvm-svn: 360286 --- diff --git a/lldb/include/lldb/Utility/Reproducer.h b/lldb/include/lldb/Utility/Reproducer.h index 14b9309..60e6ffe 100644 --- a/lldb/include/lldb/Utility/Reproducer.h +++ b/lldb/include/lldb/Utility/Reproducer.h @@ -126,6 +126,7 @@ public: m_os << t; if (newline) m_os << '\n'; + m_os.flush(); } const FileSpec &GetFilename() { return m_filename; } diff --git a/lldb/include/lldb/Utility/ReproducerInstrumentation.h b/lldb/include/lldb/Utility/ReproducerInstrumentation.h index 6835e8e..f90ce4b 100644 --- a/lldb/include/lldb/Utility/ReproducerInstrumentation.h +++ b/lldb/include/lldb/Utility/ReproducerInstrumentation.h @@ -542,7 +542,9 @@ public: SerializeAll(tail...); } - void SerializeAll() {} + void SerializeAll() { + m_stream.flush(); + } private: /// Serialize pointers. We need to differentiate between pointers to