Hi abidh, clayborg,
# Turn off interpreter.prompt-on-quit on startup (MI)
# Add CommandInterpreter::SetPromptOnQuit
# Add SBCommandInterpreter::GetPromptOnQuit/SetPromptOnQuit
All tests pass on OS X.
http://reviews.llvm.org/D8444
Files:
include/lldb/API/SBCommandInterpreter.h
include/lldb/Interpreter/CommandInterpreter.h
source/API/SBCommandInterpreter.cpp
source/Interpreter/CommandInterpreter.cpp
tools/lldb-mi/MICmnLLDBDebugger.cpp
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
Index: include/lldb/API/SBCommandInterpreter.h
===================================================================
--- include/lldb/API/SBCommandInterpreter.h
+++ include/lldb/API/SBCommandInterpreter.h
@@ -216,6 +216,12 @@
const char *
GetIOHandlerControlSequence(char ch);
+ bool
+ GetPromptOnQuit() const;
+
+ void
+ SetPromptOnQuit(bool b);
+
protected:
lldb_private::CommandInterpreter &
Index: include/lldb/Interpreter/CommandInterpreter.h
===================================================================
--- include/lldb/Interpreter/CommandInterpreter.h
+++ include/lldb/Interpreter/CommandInterpreter.h
@@ -625,6 +625,9 @@
bool
GetPromptOnQuit () const;
+ void
+ SetPromptOnQuit (bool b);
+
bool
GetStopCmdSourceOnError () const;
Index: source/API/SBCommandInterpreter.cpp
===================================================================
--- source/API/SBCommandInterpreter.cpp
+++ source/API/SBCommandInterpreter.cpp
@@ -446,6 +446,21 @@
return sb_debugger;
}
+bool
+SBCommandInterpreter::GetPromptOnQuit() const
+{
+ if (m_opaque_ptr)
+ return m_opaque_ptr->GetPromptOnQuit();
+ return false;
+}
+
+void
+SBCommandInterpreter::SetPromptOnQuit (bool b)
+{
+ if (m_opaque_ptr)
+ m_opaque_ptr->SetPromptOnQuit(b);
+}
+
CommandInterpreter *
SBCommandInterpreter::get ()
{
@@ -843,4 +858,3 @@
return lldb::SBCommand(new_command_sp);
return lldb::SBCommand();
}
-
Index: source/Interpreter/CommandInterpreter.cpp
===================================================================
--- source/Interpreter/CommandInterpreter.cpp
+++ 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
{
Index: tools/lldb-mi/MICmnLLDBDebugger.cpp
===================================================================
--- tools/lldb-mi/MICmnLLDBDebugger.cpp
+++ tools/lldb-mi/MICmnLLDBDebugger.cpp
@@ -233,11 +233,15 @@
CMICmnLLDBDebugger::InitSBDebugger(void)
{
m_lldbDebugger = lldb::SBDebugger::Create(false);
- if (m_lldbDebugger.IsValid())
- return MIstatus::success;
+ if (!m_lldbDebugger.IsValid())
+ {
+ SetErrorDescription(MIRSRC(IDS_LLDBDEBUGGER_ERR_INVALIDDEBUGGER));
+ return MIstatus::failure;
+ }
- SetErrorDescription(MIRSRC(IDS_LLDBDEBUGGER_ERR_INVALIDDEBUGGER));
- return MIstatus::failure;
+ m_lldbDebugger.GetCommandInterpreter().SetPromptOnQuit(false);
+
+ return MIstatus::success;
}
//++ ------------------------------------------------------------------------------------
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits