summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/Debugger.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Core/Debugger.cpp')
-rw-r--r--lldb/source/Core/Debugger.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp
index 19b476bd1f6..1f12dc4dbd6 100644
--- a/lldb/source/Core/Debugger.cpp
+++ b/lldb/source/Core/Debugger.cpp
@@ -418,17 +418,22 @@ llvm::StringRef Debugger::GetReproducerPath() const {
return r.GetReproducerPath().GetCString();
}
-void Debugger::SetReproducerPath(llvm::StringRef p) {
- auto &r = repro::Reproducer::Instance();
- if (auto e = r.SetReproducerPath(FileSpec(p)))
- llvm::consumeError(std::move(e));
+llvm::Error Debugger::SetReproducerReplay(llvm::StringRef p) {
+ llvm::Optional<FileSpec> arg = llvm::None;
+
+ if (!p.empty())
+ arg = FileSpec(p);
+
+ return repro::Reproducer::Instance().SetReplay(arg);
}
llvm::Error Debugger::SetReproducerCapture(bool b) {
- auto &r = repro::Reproducer::Instance();
- if (auto e = r.SetGenerateReproducer(b))
- return e;
- return llvm::Error::success();
+ llvm::Optional<FileSpec> arg = llvm::None;
+
+ if (b)
+ arg = HostInfo::GetReproducerTempDir();
+
+ return repro::Reproducer::Instance().SetCapture(arg);
}
const FormatEntity::Entry *Debugger::GetThreadFormat() const {
OpenPOWER on IntegriCloud