Fix double stdout/stderr output from CLI commands in MI mode (MI)

Summary:
This patch fixes stdout/stderr output that printed twice for CLI commands:
was:
```
(gdb)
target create ~/p/hello
Current executable set to '~/p/hello' (x86_64).
Current executable set to '~/p/hello' (x86_64).
^done
(gdb)
```
now:
```
(gdb)
target create ~/p/hello
Current executable set to '~/p/hello' (x86_64).
^done
(gdb)
```

Test Plan: ./dotest.py -v --executable $BUILDDIR/bin/lldb tools/lldb-mi/

Reviewers: abidh

Reviewed By: abidh

Subscribers: lldb-commits, abidh

Differential Revision: http://reviews.llvm.org/D9277

llvm-svn: 235857
This commit is contained in:
Ilia K 2015-04-27 10:07:49 +00:00
parent c25918a043
commit c04ce6e25c
1 changed files with 0 additions and 7 deletions

View File

@ -483,19 +483,12 @@ CMICmdCmdInterpreterExec::Acknowledge(void)
CMIUtilString strMsg(m_lldbResult.GetOutput());
strMsg = strMsg.StripCREndOfLine();
CMICmnStreamStdout::TextToStdout(strMsg);
// Send the LLDB result message to console so the user can see the result of the
// command they typed. It is not necessary an error message.
CMICmnStreamStderr::LLDBMsgToConsole(strMsg);
}
if (m_lldbResult.GetErrorSize() > 0)
{
CMIUtilString strMsg(m_lldbResult.GetError());
strMsg = strMsg.StripCREndOfLine();
CMICmnStreamStderr::LLDBMsgToConsole(strMsg);
// Send LLDB's error message to the MI Driver's Log file
CMICmnStreamStdout::TextToStdout(strMsg);
}
const CMICmnMIResultRecord miRecordResult(m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done);