summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-05-08 21:07:19 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-05-08 21:07:19 +0000
commita1d0efa2e3ac6bf2ce780a8da6d0d11f9b32d2d1 (patch)
tree0fe71da8bf92514b628a66a81934e02df6f0aef6
parentda2a31764475b150be8cb986decbc3cde1667029 (diff)
downloadbcm5719-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.h1
-rw-r--r--lldb/include/lldb/Utility/ReproducerInstrumentation.h4
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
OpenPOWER on IntegriCloud