summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h
index 13325410e48..23568cd4b36 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h
@@ -114,12 +114,21 @@ public:
CalculcateChecksum (const char *payload,
size_t payload_length);
+ bool
+ GetSequenceMutex(std::unique_lock<std::recursive_mutex> &lock, const char *failure_message = nullptr);
+
PacketType
CheckForPacket (const uint8_t *src,
size_t src_len,
StringExtractorGDBRemote &packet);
bool
+ IsRunning() const
+ {
+ return m_public_is_running.GetValue();
+ }
+
+ bool
GetSendAcks ()
{
return m_send_acks;
@@ -276,6 +285,13 @@ protected:
uint32_t m_packet_timeout;
uint32_t m_echo_number;
LazyBool m_supports_qEcho;
+#ifdef ENABLE_MUTEX_ERROR_CHECKING
+#error TrackingMutex is no longer supported
+#else
+ std::recursive_mutex m_sequence_mutex; // Restrict access to sending/receiving packets to a single thread at a time
+#endif
+ Predicate<bool> m_public_is_running;
+ Predicate<bool> m_private_is_running;
History m_history;
bool m_send_acks;
bool m_is_platform; // Set to true if this class represents a platform,
@@ -285,6 +301,10 @@ protected:
CompressionType m_compression_type;
PacketResult
+ SendPacket (const char *payload,
+ size_t payload_length);
+
+ PacketResult
SendPacketNoLock (const char *payload,
size_t payload_length);
@@ -301,6 +321,9 @@ protected:
bool sync_on_timeout);
bool
+ WaitForNotRunningPrivate(const std::chrono::microseconds &timeout);
+
+ bool
CompressionIsEnabled ()
{
return m_compression_type != CompressionType::None;
OpenPOWER on IntegriCloud