summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-11-21 13:34:01 -0800
committerJonas Devlieghere <jonas@devlieghere.com>2019-11-21 13:34:04 -0800
commitbb090bb1cad28cef1ad74c8ca986f3f5643eb6d9 (patch)
tree00876d7db98bb3e3f19d8efe1e5db5d2e18ab545 /lldb/source/Commands
parentb26d9e417d2d4dbb47f6e967926dbb31f6d7a4b4 (diff)
downloadbcm5719-llvm-bb090bb1cad28cef1ad74c8ca986f3f5643eb6d9.tar.gz
bcm5719-llvm-bb090bb1cad28cef1ad74c8ca986f3f5643eb6d9.zip
[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.
Diffstat (limited to 'lldb/source/Commands')
-rw-r--r--lldb/source/Commands/CommandObjectReproducer.cpp5
1 files changed, 3 insertions, 2 deletions
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);
OpenPOWER on IntegriCloud