diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-05-08 21:07:19 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-05-08 21:07:19 +0000 |
commit | a1d0efa2e3ac6bf2ce780a8da6d0d11f9b32d2d1 (patch) | |
tree | 0fe71da8bf92514b628a66a81934e02df6f0aef6 | |
parent | da2a31764475b150be8cb986decbc3cde1667029 (diff) | |
download | bcm5719-llvm-a1d0efa2e3ac6bf2ce780a8da6d0d11f9b32d2d1.tar.gz bcm5719-llvm-a1d0efa2e3ac6bf2ce780a8da6d0d11f9b32d2d1.zip |
[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
-rw-r--r-- | lldb/include/lldb/Utility/Reproducer.h | 1 | ||||
-rw-r--r-- | lldb/include/lldb/Utility/ReproducerInstrumentation.h | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/lldb/include/lldb/Utility/Reproducer.h b/lldb/include/lldb/Utility/Reproducer.h index 14b9309f16d..60e6ffe65a5 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 6835e8e52ef..f90ce4bc767 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 |