summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
diff options
context:
space:
mode:
authorVince Harron <vince@nethacker.com>2015-04-15 10:40:51 +0000
committerVince Harron <vince@nethacker.com>2015-04-15 10:40:51 +0000
commit43d79053d7a1f698c8c81cff5666522c0b2d5e0a (patch)
treed6683475241ea8c68cf2645cf95916a0f40279ce /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
parent0f2b1aba157a5bc24a376094f5820360edb277fe (diff)
downloadbcm5719-llvm-43d79053d7a1f698c8c81cff5666522c0b2d5e0a.tar.gz
bcm5719-llvm-43d79053d7a1f698c8c81cff5666522c0b2d5e0a.zip
Fixed remote failures in TestCPP11EnumTypes, probably others
Typically, LLGS only sends stdout/stderr notifications when the inferior process is running. Because LLGS reads stdout from the process in a separate thread, sometimes these stdout notifications can be received after the server has sent a thread stop message. The host isn't expecting stdout to be generated by the target after a stop message and these messages interfere with the host's request/ response paradigm. Differential Revision: http://reviews.llvm.org/D9024 llvm-svn: 234995
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
index 3dfb6684e26..d4bbb6f4972 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
@@ -747,6 +747,11 @@ GDBRemoteCommunicationServerLLGS::ProcessStateChanged (NativeProcessProtocol *pr
StateAsCString (state));
}
+ // Make sure we get all of the pending stdout/stderr from the inferior
+ // and send it to the lldb host before we send the state change
+ // notification
+ m_stdio_communication.SynchronizeWithReadThread();
+
switch (state)
{
case StateType::eStateExited:
OpenPOWER on IntegriCloud