[Lldb-commits] [lldb] r355009 - [Reproducer] Make 'reproducer generate' a NOOP during replay.

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Wed Feb 27 09:47:06 PST 2019


Author: jdevlieghere
Date: Wed Feb 27 09:47:06 2019
New Revision: 355009

URL: http://llvm.org/viewvc/llvm-project?rev=355009&view=rev
Log:
[Reproducer] Make 'reproducer generate' a NOOP during replay.

Instead of filtering out the 'reproducer generate' command during
replay, just make the operation a NOOP.

Modified:
    lldb/trunk/source/Commands/CommandObjectReproducer.cpp

Modified: lldb/trunk/source/Commands/CommandObjectReproducer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectReproducer.cpp?rev=355009&r1=355008&r2=355009&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectReproducer.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectReproducer.cpp Wed Feb 27 09:47:06 2019
@@ -37,8 +37,13 @@ protected:
     auto &r = repro::Reproducer::Instance();
     if (auto generator = r.GetGenerator()) {
       generator->Keep();
+    } else if (r.GetLoader()) {
+      // Make this operation a NOP in replay mode.
+      result.SetStatus(eReturnStatusSuccessFinishNoResult);
+      return result.Succeeded();
     } else {
       result.AppendErrorWithFormat("Unable to get the reproducer generator");
+      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 




More information about the lldb-commits mailing list