Author: Jonas Devlieghere Date: 2019-11-21T13:34:04-08:00 New Revision: bb090bb1cad28cef1ad74c8ca986f3f5643eb6d9
URL: https://github.com/llvm/llvm-project/commit/bb090bb1cad28cef1ad74c8ca986f3f5643eb6d9 DIFF: https://github.com/llvm/llvm-project/commit/bb090bb1cad28cef1ad74c8ca986f3f5643eb6d9.diff LOG: [Reproducer] Make 'reproducer xcrash' behave the same during capture & replay There's no point in preventing this command from running during replay. We should simulate the same crash as during capture. Added: Modified: lldb/source/Commands/CommandObjectReproducer.cpp Removed: ################################################################################ diff --git a/lldb/source/Commands/CommandObjectReproducer.cpp b/lldb/source/Commands/CommandObjectReproducer.cpp index 2797f3c0a9f0..a4c69db492da 100644 --- a/lldb/source/Commands/CommandObjectReproducer.cpp +++ b/lldb/source/Commands/CommandObjectReproducer.cpp @@ -122,7 +122,7 @@ class CommandObjectReproducerGenerate : public CommandObjectParsed { if (auto generator = r.GetGenerator()) { generator->Keep(); } else if (r.IsReplaying()) { - // Make this operation a NOP in replay mode. + // Make this operation a NO-OP in replay mode. result.SetStatus(eReturnStatusSuccessFinishNoResult); return result.Succeeded(); } else { @@ -202,7 +202,8 @@ class CommandObjectReproducerXCrash : public CommandObjectParsed { } auto &r = Reproducer::Instance(); - if (!r.IsCapturing()) { + + if (!r.IsCapturing() && !r.IsReplaying()) { result.SetError( "forcing a crash is only supported when capturing a reproducer."); result.SetStatus(eReturnStatusSuccessFinishNoResult); _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits