diff options
-rw-r--r-- | lldb/lit/Reproducer/TestReuseDirectory.test | 10 | ||||
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/lldb/lit/Reproducer/TestReuseDirectory.test b/lldb/lit/Reproducer/TestReuseDirectory.test new file mode 100644 index 00000000000..d4867365cf9 --- /dev/null +++ b/lldb/lit/Reproducer/TestReuseDirectory.test @@ -0,0 +1,10 @@ +# UNSUPPORTED: system-windows, system-freebsd + +# Test that we can capture twice to the same directory without breaking the +# reproducer functionality. + +# RUN: rm -rf %t.repro +# RUN: %clang %S/Inputs/simple.c -g -o %t.out +# RUN: %lldb -x -b -s %S/Inputs/GDBRemoteCapture.in --capture --capture-path %t.repro %t.out | FileCheck %S/TestGDBRemoteRepro.test --check-prefix CHECK --check-prefix CAPTURE +# RUN: %lldb -x -b -s %S/Inputs/GDBRemoteCapture.in --capture --capture-path %t.repro %t.out | FileCheck %S/TestGDBRemoteRepro.test --check-prefix CHECK --check-prefix CAPTURE +# RUN: %lldb --replay %t.repro | FileCheck %S/TestGDBRemoteRepro.test --check-prefix CHECK --check-prefix REPLAY diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index 1b9c5d610d5..6200486a67f 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -178,7 +178,7 @@ public: std::error_code EC; m_stream_up = llvm::make_unique<raw_fd_ostream>(history_file.GetPath(), EC, - sys::fs::OpenFlags::F_None); + sys::fs::OpenFlags::F_Text); return m_stream_up.get(); } |