From 1355c047ab0001e6c237bb4f29d756fa6e847246 Mon Sep 17 00:00:00 2001 From: Ilia K Date: Thu, 9 Apr 2015 18:18:10 +0000 Subject: Fix Debugger::HandleProcessEvent in case when ProcessIOHandler doesn't exist Summary: Previously the Debugger::HandleProcessEvent hid a top IOHandler if the process's IOHandler was inactive and later refreshed it. Usually the IOHandler.Refresh() prints the (lldb) prompt. The problem was in case of iOS remote platform when trying to execute 'command source' command. On this platform the process's IOHandler is empty, therefore the Debugger::HandleProcessEvent hid a top IOHandler and later refreshed it. So that the (lldb) prompt was printed with a program output in mixed order: was: ``` longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong longlonglonglonglonglonglonglonglonglonglonglonglonglonglon(lldb) glonglonglonglonglonglonglonglonglonglonglonglong string ``` now: ``` longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong longlonglonglonglonglonglonglonglong string ``` Reviewers: zturner, jingham, clayborg Reviewed By: clayborg Subscribers: lldb-commits, jingham, zturner, clayborg Differential Revision: http://reviews.llvm.org/D8929 llvm-svn: 234517 --- lldb/source/Core/Debugger.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lldb/source/Core/Debugger.cpp') diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp index 2eedb0f844a..ee2354e7b50 100644 --- a/lldb/source/Core/Debugger.cpp +++ b/lldb/source/Core/Debugger.cpp @@ -1519,7 +1519,7 @@ Debugger::HandleProcessEvent (const EventSP &event_sp) StreamFileSP error_stream_sp (GetOutputFile()); bool top_io_handler_hid = false; - if (process_sp->ProcessIOHandlerIsActive() == false) + if (process_sp->ProcessIOHandlerExists() && process_sp->ProcessIOHandlerIsActive() == false) top_io_handler_hid = HideTopIOHandler(); if (output_stream.GetSize()) -- cgit v1.2.3