Skip to content

Commit aeb1b9b

Browse files
committed
[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. (cherry picked from commit 0cf86da)
1 parent e12c7c2 commit aeb1b9b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lldb/source/Commands/CommandObjectReproducer.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class CommandObjectReproducerGenerate : public CommandObjectParsed {
7878
interpreter, "reproducer generate",
7979
"Generate reproducer on disk. When the debugger is in capture "
8080
"mode, this command will output the reproducer to a directory on "
81-
"disk. In replay mode this command in a no-op.",
81+
"disk and quit. In replay mode this command in a no-op.",
8282
nullptr) {}
8383

8484
~CommandObjectReproducerGenerate() override = default;
@@ -110,7 +110,9 @@ class CommandObjectReproducerGenerate : public CommandObjectParsed {
110110
<< "Please have a look at the directory to assess if you're willing to "
111111
"share the contained information.\n";
112112

113-
result.SetStatus(eReturnStatusSuccessFinishResult);
113+
m_interpreter.BroadcastEvent(
114+
CommandInterpreter::eBroadcastBitQuitCommandReceived);
115+
result.SetStatus(eReturnStatusQuit);
114116
return result.Succeeded();
115117
}
116118
};

0 commit comments

Comments
 (0)