diff options
| author | Jonas Devlieghere <jonas@devlieghere.com> | 2020-04-14 08:41:50 -0700 |
|---|---|---|
| committer | Jonas Devlieghere <jonas@devlieghere.com> | 2020-04-14 09:24:23 -0700 |
| commit | fc410138939fbc98d7eb700e0e898500a00efc4d (patch) | |
| tree | fc6c99eec9108bbb1b19bb4a6b2251b733811d7c /lldb/source/API/SBReproducer.cpp | |
| parent | c1a9dd9aea498dd78d6583f29f15a690ddd5466a (diff) | |
[lldb/Reproducers] Capture reproducers from the API test suite.
Make it possible to capture reproducers from the API test suite. Given
the symmetry between capture and replay, this patch also adds the
necessary code for replay. For now this is a NO-OP until the
corresponding reproducer instrumentation changes land.
For more info please refer to the RFC on lldb-dev:
http://lists.llvm.org/pipermail/lldb-dev/2020-April/016100.html
Differential revision: https://reviews.llvm.org/D77588
Diffstat (limited to 'lldb/source/API/SBReproducer.cpp')
| -rw-r--r-- | lldb/source/API/SBReproducer.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lldb/source/API/SBReproducer.cpp b/lldb/source/API/SBReproducer.cpp index 15ad887f11f3..ba9127962ebd 100644 --- a/lldb/source/API/SBReproducer.cpp +++ b/lldb/source/API/SBReproducer.cpp @@ -124,6 +124,15 @@ const char *SBReproducer::Capture(const char *path) { return nullptr; } +const char *SBReproducer::PassiveReplay(const char *path) { + static std::string error; + if (auto e = Reproducer::Initialize(ReproducerMode::Replay, FileSpec(path))) { + error = llvm::toString(std::move(e)); + return error.c_str(); + } + return nullptr; +} + const char *SBReproducer::Replay(const char *path) { return SBReproducer::Replay(path, false); } |
