From bb090bb1cad28cef1ad74c8ca986f3f5643eb6d9 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Thu, 21 Nov 2019 13:34:01 -0800 Subject: [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. --- lldb/source/Commands/CommandObjectReproducer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lldb/source/Commands') diff --git a/lldb/source/Commands/CommandObjectReproducer.cpp b/lldb/source/Commands/CommandObjectReproducer.cpp index 2797f3c0a9f..a4c69db492d 100644 --- a/lldb/source/Commands/CommandObjectReproducer.cpp +++ b/lldb/source/Commands/CommandObjectReproducer.cpp @@ -122,7 +122,7 @@ protected: 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 @@ protected: } 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); -- cgit v1.2.3