Turn off 'quit' confirmation in lldb-mi
Summary:
# Turn off interpreter.prompt-on-quit on startup (MI)
# Add CommandInterpreter::SetPromptOnQuit
# Add SBCommandInterpreter::GetPromptOnQuit/SetPromptOnQuit
All tests pass on OS X.
Test Plan:
```
-file-exec-and-symbols ~/p/hello
-break-insert -f main
-exec-run
-interpreter-exec console quit
```
Reviewers: abidh, clayborg
Reviewed By: abidh, clayborg
Subscribers: lldb-commits, clayborg, abidh
Differential Revision: http://reviews.llvm.org/D8444
llvm-svn: 233034
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index eaa21ad..a203d50 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -149,6 +149,13 @@
return m_collection_sp->GetPropertyAtIndexAsBoolean (nullptr, idx, g_properties[idx].default_uint_value != 0);
}
+void
+CommandInterpreter::SetPromptOnQuit (bool b)
+{
+ const uint32_t idx = ePropertyPromptOnQuit;
+ m_collection_sp->SetPropertyAtIndexAsBoolean (nullptr, idx, b);
+}
+
bool
CommandInterpreter::GetStopCmdSourceOnError () const
{