diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-11-11 14:16:52 -0800 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-11-11 14:29:53 -0800 |
commit | 0cf86da1741fb1a4278dc31dfc8f1538c9186892 (patch) | |
tree | e170680f325c2ae8eb3c3b1a4a4eac39d8d1b3de /lldb/source/Commands/CommandObjectReproducer.cpp | |
parent | edab7dd426249bd40059b49b255ba9cc5b784753 (diff) | |
download | bcm5719-llvm-0cf86da1741fb1a4278dc31dfc8f1538c9186892.tar.gz bcm5719-llvm-0cf86da1741fb1a4278dc31dfc8f1538c9186892.zip |
[Reproducer] Quit the debugger after generating a reproducer
Currently nothing prevents you from continuing your debug session after
generating the reproducer. This can cause the reproducer to end up in an
inconsistent state. Most of the time this doesn't matter, but I want to
prevent this from causing bugs in the future.
Diffstat (limited to 'lldb/source/Commands/CommandObjectReproducer.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectReproducer.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lldb/source/Commands/CommandObjectReproducer.cpp b/lldb/source/Commands/CommandObjectReproducer.cpp index dc4579c20fc..560df25b97c 100644 --- a/lldb/source/Commands/CommandObjectReproducer.cpp +++ b/lldb/source/Commands/CommandObjectReproducer.cpp @@ -78,7 +78,7 @@ public: interpreter, "reproducer generate", "Generate reproducer on disk. When the debugger is in capture " "mode, this command will output the reproducer to a directory on " - "disk. In replay mode this command in a no-op.", + "disk and quit. In replay mode this command in a no-op.", nullptr) {} ~CommandObjectReproducerGenerate() override = default; @@ -110,7 +110,9 @@ protected: << "Please have a look at the directory to assess if you're willing to " "share the contained information.\n"; - result.SetStatus(eReturnStatusSuccessFinishResult); + m_interpreter.BroadcastEvent( + CommandInterpreter::eBroadcastBitQuitCommandReceived); + result.SetStatus(eReturnStatusQuit); return result.Succeeded(); } }; |