[Lldb-commits] [lldb] r234517 - Fix Debugger::HandleProcessEvent in case when ProcessIOHandler doesn't exist
Ilia K
ki.stfu at gmail.com
Thu Apr 9 11:18:10 PDT 2015
Author: ki.stfu
Date: Thu Apr 9 13:18:10 2015
New Revision: 234517
URL: http://llvm.org/viewvc/llvm-project?rev=234517&view=rev
Log:
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
Modified:
lldb/trunk/include/lldb/Target/Process.h
lldb/trunk/source/Core/Debugger.cpp
Modified: lldb/trunk/include/lldb/Target/Process.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Process.h?rev=234517&r1=234516&r2=234517&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Process.h (original)
+++ lldb/trunk/include/lldb/Target/Process.h Thu Apr 9 13:18:10 2015
@@ -3258,6 +3258,12 @@ protected:
bool
ProcessIOHandlerIsActive ();
+
+ bool
+ ProcessIOHandlerExists () const
+ {
+ return static_cast<bool>(m_process_input_reader);
+ }
Error
HaltForDestroyOrDetach(lldb::EventSP &exit_event_sp);
Modified: lldb/trunk/source/Core/Debugger.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Debugger.cpp?rev=234517&r1=234516&r2=234517&view=diff
==============================================================================
--- lldb/trunk/source/Core/Debugger.cpp (original)
+++ lldb/trunk/source/Core/Debugger.cpp Thu Apr 9 13:18:10 2015
@@ -1519,7 +1519,7 @@ Debugger::HandleProcessEvent (const Even
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())
More information about the lldb-commits
mailing list