diff options
author | Jim Ingham <jingham@apple.com> | 2013-12-18 01:24:33 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2013-12-18 01:24:33 +0000 |
commit | a6195b732d099384d34f60c205d88b05628905be (patch) | |
tree | 4f6f04f8f6ebdffefb343839f0d490572739778b /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp | |
parent | c49406d18c84b5b0c4f90703e162d9496cf28db6 (diff) | |
download | bcm5719-llvm-a6195b732d099384d34f60c205d88b05628905be.tar.gz bcm5719-llvm-a6195b732d099384d34f60c205d88b05628905be.zip |
Fix a bug introduced in asynchronous packet sends. We were not setting the packet result, and so
it looked like the async packet send always failed.
<rdar://problem/15657157>
llvm-svn: 197543
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp index e708bc301ae..8c1fdf8cefc 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -84,6 +84,7 @@ GDBRemoteCommunicationClient::GDBRemoteCommunicationClient(bool is_platform) : m_async_mutex (Mutex::eMutexTypeRecursive), m_async_packet_predicate (false), m_async_packet (), + m_async_result (PacketResult::Success), m_async_response (), m_async_signal (-1), m_thread_id_to_used_usec_map (), @@ -430,6 +431,7 @@ GDBRemoteCommunicationClient::SendPacketAndWaitForResponse // Swap the response buffer to avoid malloc and string copy response.GetStringRef().swap (m_async_response.GetStringRef()); response_len = response.GetStringRef().size(); + packet_result = m_async_result; } else { @@ -742,11 +744,12 @@ GDBRemoteCommunicationClient::SendContinuePacketAndWaitForResponse Log * packet_log (ProcessGDBRemoteLog::GetLogIfAllCategoriesSet (GDBR_LOG_PACKETS)); // We are supposed to send an asynchronous packet while - // we are running. + // we are running. m_async_response.Clear(); if (m_async_packet.empty()) { - if (packet_log) + m_async_result = PacketResult::ErrorSendFailed; + if (packet_log) packet_log->Printf ("async: error: empty async packet"); } @@ -755,10 +758,10 @@ GDBRemoteCommunicationClient::SendContinuePacketAndWaitForResponse if (packet_log) packet_log->Printf ("async: sending packet"); - SendPacketAndWaitForResponse (&m_async_packet[0], - m_async_packet.size(), - m_async_response, - false); + m_async_result = SendPacketAndWaitForResponse (&m_async_packet[0], + m_async_packet.size(), + m_async_response, + false); } // Let the other thread that was trying to send the async // packet know that the packet has been sent and response is |