[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.
diff --git a/lldb/source/Commands/CommandObjectReproducer.cpp b/lldb/source/Commands/CommandObjectReproducer.cpp
index 2797f3c..a4c69db 100644
--- a/lldb/source/Commands/CommandObjectReproducer.cpp
+++ b/lldb/source/Commands/CommandObjectReproducer.cpp
@@ -122,7 +122,7 @@
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 @@
}
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);