Hi clayborg, zturner, jingham,
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
```
http://reviews.llvm.org/D8929
Files:
include/lldb/Target/Process.h
source/Core/Debugger.cpp
Index: include/lldb/Target/Process.h
===================================================================
--- include/lldb/Target/Process.h
+++ include/lldb/Target/Process.h
@@ -3258,6 +3258,12 @@
bool
ProcessIOHandlerIsActive ();
+
+ bool
+ ProcessIOHandlerExists () const
+ {
+ return static_cast<bool>(m_process_input_reader);
+ }
Error
HaltForDestroyOrDetach(lldb::EventSP &exit_event_sp);
Index: source/Core/Debugger.cpp
===================================================================
--- source/Core/Debugger.cpp
+++ source/Core/Debugger.cpp
@@ -1519,7 +1519,7 @@
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())
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
Index: include/lldb/Target/Process.h
===================================================================
--- include/lldb/Target/Process.h
+++ include/lldb/Target/Process.h
@@ -3258,6 +3258,12 @@
bool
ProcessIOHandlerIsActive ();
+
+ bool
+ ProcessIOHandlerExists () const
+ {
+ return static_cast<bool>(m_process_input_reader);
+ }
Error
HaltForDestroyOrDetach(lldb::EventSP &exit_event_sp);
Index: source/Core/Debugger.cpp
===================================================================
--- source/Core/Debugger.cpp
+++ source/Core/Debugger.cpp
@@ -1519,7 +1519,7 @@
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())
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits