[Lldb-commits] [PATCH] D15019: [LLGS] Don't forward I/O when process is stopped

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Thu Nov 26 05:15:26 PST 2015

labath created this revision.
labath added reviewers: tberghammer, ovyalov.
labath added a subscriber: lldb-commits.

This makes sure we do not attempt to send output over the gdb-remote protocol when the client is
not expecting it (i.e., after sending the stop-reply packet). Normally, this should not happen
(the process cannot generate output when it is stopped), but due to the fact that pty
communication is asynchronous in the linux kernel (llvm.org/pr25652), we may sometimes get this
output too late. Instead, we just hold the output, and send it next time we resume. This is not
ideal, but at least it makes sure we do not violate the remote protocol. Given that this happens
extremely rarely it's not worth trying to work around it with sleeps or something like that.

I also remove the m_stdio_communication_mutex, as all of LLGS is now single-threaded anyway.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15019.41241.patch
Type: text/x-patch
Size: 5772 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20151126/def541e7/attachment.bin>

More information about the lldb-commits mailing list