From 341e47891b0e81e92fb615f1e69e6a79027f13ed Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Sat, 1 Oct 2016 10:37:56 +0000 Subject: [lldb-mi] Fix prompt which can get inserted in the middle of program output in lldb-mi Summary: The code added in svn r264332 causes "(lldb) " to be printed in the middle of program console output. This fix restores the behavior for non-Windows platforms to before the patch. Reviewers: ted, zturner, clayborg Subscribers: amccarth, lldb-commits Differential Revision: http://reviews.llvm.org/D25137 llvm-svn: 283031 --- lldb/source/Core/IOHandler.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lldb/source/Core/IOHandler.cpp') diff --git a/lldb/source/Core/IOHandler.cpp b/lldb/source/Core/IOHandler.cpp index 536b0689b07..39fdd13e32a 100644 --- a/lldb/source/Core/IOHandler.cpp +++ b/lldb/source/Core/IOHandler.cpp @@ -590,8 +590,8 @@ void IOHandlerEditline::PrintAsync(Stream *stream, const char *s, size_t len) { else #endif { - const char *prompt = GetPrompt(); #ifdef _MSC_VER + const char *prompt = GetPrompt(); if (prompt) { // Back up over previous prompt using Windows API CONSOLE_SCREEN_BUFFER_INFO screen_buffer_info; @@ -605,9 +605,11 @@ void IOHandlerEditline::PrintAsync(Stream *stream, const char *s, size_t len) { } #endif IOHandler::PrintAsync(stream, s, len); +#ifdef _MSC_VER if (prompt) IOHandler::PrintAsync(GetOutputStreamFile().get(), prompt, strlen(prompt)); +#endif } } -- cgit v1.2.3