Skip to content

Commit

Permalink
[Reproducer] Quit the debugger after generating a reproducer
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
JDevlieghere committed Nov 11, 2019
1 parent edab7dd commit 0cf86da
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lldb/source/Commands/CommandObjectReproducer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class CommandObjectReproducerGenerate : public CommandObjectParsed {
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;
Expand Down Expand Up @@ -110,7 +110,9 @@ class CommandObjectReproducerGenerate : public CommandObjectParsed {
<< "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();
}
};
Expand Down

0 comments on commit 0cf86da

Please sign in to comment.