[Lldb-commits] [PATCH] Fix Debugger::HandleProcessEvent in case when ProcessIOHandler doesn't exist
Ilia K
ki.stfu at gmail.com
Thu Apr 9 10:41:10 PDT 2015
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/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8929.23506.patch
Type: text/x-patch
Size: 1007 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150409/80ec3c42/attachment.bin>
More information about the lldb-commits
mailing list