aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2016-08-09 12:04:46 +0000
committerPavel Labath <labath@google.com>2016-08-09 12:04:46 +0000
commit8c1b6bd7d2ac9c4a1a017405959185978204c5d5 (patch)
treeec8abb4d98f22b4248087064de8b6532305a7b7b /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
parent0e0e07f436f939b844ada9671f7ce38e62ecb69b (diff)
downloadllvm-8c1b6bd7d2ac9c4a1a017405959185978204c5d5.zip
llvm-8c1b6bd7d2ac9c4a1a017405959185978204c5d5.tar.gz
llvm-8c1b6bd7d2ac9c4a1a017405959185978204c5d5.tar.bz2
Reapply "Rewrite gdb-remote's SendContinuePacketAndWaitForResponse"
Resumbitting the commit after fixing the following problems: - broken unit tests on windows: incorrect gtest usage on my part (TEST vs. TEST_F) - the new code did not correctly handle the case where we went to interrupt the process, but it stopped due to a different reason - the interrupt request would remain queued and would interfere with the following "continue". I also added a unit test for this case. This reapplies r277156 and r277139. llvm-svn: 278118
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
index 340ea86..cd7bcee 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
@@ -162,9 +162,6 @@ GDBRemoteCommunication::GDBRemoteCommunication(const char *comm_name, const char
#endif
m_echo_number(0),
m_supports_qEcho(eLazyBoolCalculate),
- m_sequence_mutex(),
- m_public_is_running(false),
- m_private_is_running(false),
m_history(512),
m_send_acks(true),
m_compression_type(CompressionType::None),
@@ -227,13 +224,6 @@ GDBRemoteCommunication::SendNack ()
}
GDBRemoteCommunication::PacketResult
-GDBRemoteCommunication::SendPacket (const char *payload, size_t payload_length)
-{
- std::lock_guard<std::recursive_mutex> guard(m_sequence_mutex);
- return SendPacketNoLock (payload, payload_length);
-}
-
-GDBRemoteCommunication::PacketResult
GDBRemoteCommunication::SendPacketNoLock (const char *payload, size_t payload_length)
{
if (IsConnected())
@@ -322,22 +312,6 @@ GDBRemoteCommunication::GetAck ()
return result;
}
-bool
-GDBRemoteCommunication::GetSequenceMutex(std::unique_lock<std::recursive_mutex> &lock, const char *failure_message)
-{
- if (IsRunning())
- return (lock = std::unique_lock<std::recursive_mutex>(m_sequence_mutex, std::try_to_lock)).owns_lock();
-
- lock = std::unique_lock<std::recursive_mutex>(m_sequence_mutex);
- return true;
-}
-
-bool
-GDBRemoteCommunication::WaitForNotRunningPrivate(const std::chrono::microseconds &timeout)
-{
- return m_private_is_running.WaitForValueEqualTo(false, timeout, NULL);
-}
-
GDBRemoteCommunication::PacketResult
GDBRemoteCommunication::ReadPacket (StringExtractorGDBRemote &response, uint32_t timeout_usec, bool sync_on_timeout)
{