summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
index f4e67022fc6..bfb4755931b 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -361,14 +361,21 @@ GDBRemoteCommunicationClient::SendContinuePacketAndWaitForResponse
// make change if we are interrupted and we continue after an async packet...
std::string continue_packet(payload, packet_length);
+ bool got_stdout = false;
+
while (state == eStateRunning)
{
- if (log)
- log->Printf ("GDBRemoteCommunicationClient::%s () sending continue packet: %s", __FUNCTION__, continue_packet.c_str());
- if (SendPacket(continue_packet.c_str(), continue_packet.size()) == 0)
- state = eStateInvalid;
+ if (!got_stdout)
+ {
+ if (log)
+ log->Printf ("GDBRemoteCommunicationClient::%s () sending continue packet: %s", __FUNCTION__, continue_packet.c_str());
+ if (SendPacket(continue_packet.c_str(), continue_packet.size()) == 0)
+ state = eStateInvalid;
+
+ m_private_is_running.SetValue (true, eBroadcastNever);
+ }
- m_private_is_running.SetValue (true, eBroadcastNever);
+ got_stdout = false;
if (log)
log->Printf ("GDBRemoteCommunicationClient::%s () WaitForPacket(%.*s)", __FUNCTION__);
@@ -489,6 +496,7 @@ GDBRemoteCommunicationClient::SendContinuePacketAndWaitForResponse
case 'O':
// STDOUT
{
+ got_stdout = true;
std::string inferior_stdout;
inferior_stdout.reserve(response.GetBytesLeft () / 2);
char ch;
OpenPOWER on IntegriCloud