diff options
Diffstat (limited to 'lldb/source/API/SBReproducer.cpp')
-rw-r--r-- | lldb/source/API/SBReproducer.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/lldb/source/API/SBReproducer.cpp b/lldb/source/API/SBReproducer.cpp index 6e11b2c6366..d50d95ebb54 100644 --- a/lldb/source/API/SBReproducer.cpp +++ b/lldb/source/API/SBReproducer.cpp @@ -30,7 +30,7 @@ using namespace lldb_private; using namespace lldb_private::repro; SBRegistry::SBRegistry() { - Registry& R = *this; + Registry &R = *this; RegisterMethods<SBAddress>(R); RegisterMethods<SBAttachInfo>(R); @@ -149,6 +149,22 @@ const char *SBReproducer::Replay(const char *path) { return nullptr; } +bool SBReproducer::Generate() { + auto &r = Reproducer::Instance(); + if (auto generator = r.GetGenerator()) { + generator->Keep(); + return true; + } + return false; +} + +const char *SBReproducer::GetPath() { + static std::string path; + auto &r = Reproducer::Instance(); + path = r.GetReproducerPath().GetCString(); + return path.c_str(); +} + char lldb_private::repro::SBProvider::ID = 0; const char *SBProvider::Info::name = "sbapi"; const char *SBProvider::Info::file = "sbapi.bin"; |