[Lldb-commits] [lldb] r235857 - Fix double stdout/stderr output from CLI commands in MI mode (MI)

Ilia K ki.stfu at gmail.com
Mon Apr 27 03:07:50 PDT 2015


Author: ki.stfu
Date: Mon Apr 27 05:07:49 2015
New Revision: 235857

URL: http://llvm.org/viewvc/llvm-project?rev=235857&view=rev
Log:
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

Modified:
    lldb/trunk/tools/lldb-mi/MICmdCmdMiscellanous.cpp

Modified: lldb/trunk/tools/lldb-mi/MICmdCmdMiscellanous.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdCmdMiscellanous.cpp?rev=235857&r1=235856&r2=235857&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdCmdMiscellanous.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmdCmdMiscellanous.cpp Mon Apr 27 05:07:49 2015
@@ -483,19 +483,12 @@ CMICmdCmdInterpreterExec::Acknowledge(vo
         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);





More information about the lldb-commits mailing list