diff options
Diffstat (limited to 'tools/lldb-mi/MICmdInvoker.cpp')
| -rw-r--r-- | tools/lldb-mi/MICmdInvoker.cpp | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/tools/lldb-mi/MICmdInvoker.cpp b/tools/lldb-mi/MICmdInvoker.cpp index 9f82e92dc4bb..124a82d162e7 100644 --- a/tools/lldb-mi/MICmdInvoker.cpp +++ b/tools/lldb-mi/MICmdInvoker.cpp @@ -22,7 +22,7 @@ // Return: None. // Throws: None. //-- -CMICmdInvoker::CMICmdInvoker(void) +CMICmdInvoker::CMICmdInvoker() : m_rStreamOut(CMICmnStreamStdout::Instance()) { } @@ -34,7 +34,7 @@ CMICmdInvoker::CMICmdInvoker(void) // Return: None. // Throws: None. //-- -CMICmdInvoker::~CMICmdInvoker(void) +CMICmdInvoker::~CMICmdInvoker() { Shutdown(); } @@ -48,7 +48,7 @@ CMICmdInvoker::~CMICmdInvoker(void) // Throws: None. //-- bool -CMICmdInvoker::Initialize(void) +CMICmdInvoker::Initialize() { m_clientUsageRefCnt++; @@ -69,7 +69,7 @@ CMICmdInvoker::Initialize(void) // Throws: None. //-- bool -CMICmdInvoker::Shutdown(void) +CMICmdInvoker::Shutdown() { if (--m_clientUsageRefCnt > 0) return MIstatus::success; @@ -92,7 +92,7 @@ CMICmdInvoker::Shutdown(void) // Throws: None. //-- void -CMICmdInvoker::CmdDeleteAll(void) +CMICmdInvoker::CmdDeleteAll() { CMICmdMgr &rMgr = CMICmdMgr::Instance(); MapCmdIdToCmd_t::const_iterator it = m_mapCmdIdToCmd.begin(); @@ -189,16 +189,20 @@ CMICmdInvoker::CmdExecute(CMICmdBase &vCmd) { bool bOk = CmdAdd(vCmd); - if (bOk && !vCmd.ParseArgs()) + if (bOk) { - // Report command execution failed - const SMICmdData cmdData(vCmd.GetCmdData()); - CmdStdout(cmdData); - CmdCauseAppExit(vCmd); - CmdDelete(cmdData.id); - - // Proceed to wait or execute next command - return MIstatus::success; + vCmd.AddCommonArgs(); + if (!vCmd.ParseArgs()) + { + // Report command execution failed + const SMICmdData cmdData(vCmd.GetCmdData()); + CmdStdout(cmdData); + CmdCauseAppExit(vCmd); + CmdDelete(cmdData.id); + + // Proceed to wait or execute next command + return MIstatus::success; + } } if (bOk && !vCmd.Execute()) |
