Index: include/lldb/API/SBCommandInterpreter.h =================================================================== --- include/lldb/API/SBCommandInterpreter.h +++ include/lldb/API/SBCommandInterpreter.h @@ -219,6 +219,12 @@ const char * GetIOHandlerControlSequence(char ch); + bool + GetPromptOnQuit(); + + 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: scripts/Python/interface/SBCommandInterpreter.i =================================================================== --- scripts/Python/interface/SBCommandInterpreter.i +++ scripts/Python/interface/SBCommandInterpreter.i @@ -150,6 +150,12 @@ GetIOHandlerControlSequence(char ch); bool + GetPromptOnQuit(); + + void + SetPromptOnQuit(bool b); + + bool CommandExists (const char *cmd); bool Index: source/API/SBCommandInterpreter.cpp =================================================================== --- source/API/SBCommandInterpreter.cpp +++ source/API/SBCommandInterpreter.cpp @@ -447,6 +447,21 @@ return sb_debugger; } +bool +SBCommandInterpreter::GetPromptOnQuit() +{ + 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 () { @@ -850,4 +865,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; } //++ ------------------------------------------------------------------------------------