LLDB mainline
Classes | Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
lldb_private::process_gdb_remote::GDBRemoteClientBase Class Reference

#include <GDBRemoteClientBase.h>

Inheritance diagram for lldb_private::process_gdb_remote::GDBRemoteClientBase:
Inheritance graph
[legend]

Classes

struct  ContinueDelegate
 
class  ContinueLock
 
class  Lock
 

Public Types

enum  { eBroadcastBitRunPacketSent = (1u << 0) }
 
- Public Types inherited from lldb_private::process_gdb_remote::GDBRemoteCommunication
enum class  PacketType { Invalid = 0 , Standard , Notify }
 
enum class  PacketResult {
  Success = 0 , ErrorSendFailed , ErrorSendAck , ErrorReplyFailed ,
  ErrorReplyTimeout , ErrorReplyInvalid , ErrorReplyAck , ErrorDisconnected ,
  ErrorNoSequenceLock
}
 

Public Member Functions

 GDBRemoteClientBase (const char *comm_name)
 
bool SendAsyncSignal (int signo, std::chrono::seconds interrupt_timeout)
 
bool Interrupt (std::chrono::seconds interrupt_timeout)
 
lldb::StateType SendContinuePacketAndWaitForResponse (ContinueDelegate &delegate, const UnixSignals &signals, llvm::StringRef payload, std::chrono::seconds interrupt_timeout, StringExtractorGDBRemote &response)
 
PacketResult SendPacketAndWaitForResponse (llvm::StringRef payload, StringExtractorGDBRemote &response, std::chrono::seconds interrupt_timeout=std::chrono::seconds(0))
 
PacketResult ReadPacketWithOutputSupport (StringExtractorGDBRemote &response, Timeout< std::micro > timeout, bool sync_on_timeout, llvm::function_ref< void(llvm::StringRef)> output_callback)
 
PacketResult SendPacketAndReceiveResponseWithOutputSupport (llvm::StringRef payload, StringExtractorGDBRemote &response, std::chrono::seconds interrupt_timeout, llvm::function_ref< void(llvm::StringRef)> output_callback)
 
- Public Member Functions inherited from lldb_private::process_gdb_remote::GDBRemoteCommunication
 GDBRemoteCommunication ()
 
 ~GDBRemoteCommunication () override
 
PacketResult GetAck ()
 
size_t SendAck ()
 
size_t SendNack ()
 
char CalculcateChecksum (llvm::StringRef payload)
 
PacketType CheckForPacket (const uint8_t *src, size_t src_len, StringExtractorGDBRemote &packet)
 
bool GetSendAcks ()
 
std::chrono::seconds SetPacketTimeout (std::chrono::seconds packet_timeout)
 
std::chrono::seconds GetPacketTimeout () const
 
Status StartDebugserverProcess (const char *url, Platform *platform, ProcessLaunchInfo &launch_info, uint16_t *port, const Args *inferior_args, int pass_comm_fd)
 
void DumpHistory (Stream &strm)
 
void SetPacketRecorder (repro::PacketRecorder *recorder)
 
- Public Member Functions inherited from lldb_private::Communication
 Communication ()
 Construct the Communication object.
 
virtual ~Communication ()
 Destructor.
 
virtual void Clear ()
 
lldb::ConnectionStatus Connect (const char *url, Status *error_ptr)
 Connect using the current connection by passing url to its connect function.
 
virtual lldb::ConnectionStatus Disconnect (Status *error_ptr=nullptr)
 Disconnect the communications connection if one is currently connected.
 
bool IsConnected () const
 Check if the connection is valid.
 
bool HasConnection () const
 
lldb_private::ConnectionGetConnection ()
 
virtual size_t Read (void *dst, size_t dst_len, const Timeout< std::micro > &timeout, lldb::ConnectionStatus &status, Status *error_ptr)
 Read bytes from the current connection.
 
size_t Write (const void *src, size_t src_len, lldb::ConnectionStatus &status, Status *error_ptr)
 The actual write function that attempts to write to the communications protocol.
 
size_t WriteAll (const void *src, size_t src_len, lldb::ConnectionStatus &status, Status *error_ptr)
 Repeatedly attempt writing until either src_len bytes are written or a permanent failure occurs.
 
virtual void SetConnection (std::unique_ptr< Connection > connection)
 Sets the connection that it to be used by this class.
 
bool GetCloseOnEOF () const
 
void SetCloseOnEOF (bool b)
 
- Public Member Functions inherited from lldb_private::Broadcaster
 Broadcaster (lldb::BroadcasterManagerSP manager_sp, std::string name)
 Construct with a broadcaster with a name.
 
virtual ~Broadcaster ()
 Destructor.
 
void CheckInWithManager ()
 
void BroadcastEvent (lldb::EventSP &event_sp)
 Broadcast an event which has no associated data.
 
void BroadcastEventIfUnique (lldb::EventSP &event_sp)
 
void BroadcastEvent (uint32_t event_type, const lldb::EventDataSP &event_data_sp)
 
void BroadcastEvent (uint32_t event_type)
 
void BroadcastEventIfUnique (uint32_t event_type)
 
void Clear ()
 
virtual void AddInitialEventsToListener (const lldb::ListenerSP &listener_sp, uint32_t requested_events)
 
uint32_t AddListener (const lldb::ListenerSP &listener_sp, uint32_t event_mask)
 Listen for any events specified by event_mask.
 
const std::string & GetBroadcasterName ()
 Get this broadcaster's name.
 
bool GetEventNames (Stream &s, const uint32_t event_mask, bool prefix_with_broadcaster_name) const
 Get the event name(s) for one or more event bits.
 
void SetEventName (uint32_t event_mask, const char *name)
 Set the name for an event bit.
 
const char * GetEventName (uint32_t event_mask) const
 
bool EventTypeHasListeners (uint32_t event_type)
 
bool RemoveListener (const lldb::ListenerSP &listener_sp, uint32_t event_mask=UINT32_MAX)
 Removes a Listener from this broadcasters list and frees the event bits specified by event_mask that were previously acquired by listener (assuming listener was listening to this object) for other listener objects to use.
 
bool HijackBroadcaster (const lldb::ListenerSP &listener_sp, uint32_t event_mask=UINT32_MAX)
 Provides a simple mechanism to temporarily redirect events from broadcaster.
 
bool IsHijackedForEvent (uint32_t event_mask)
 
void RestoreBroadcaster ()
 Restore the state of the Broadcaster from a previous hijack attempt.
 
virtual ConstStringGetBroadcasterClass () const
 This needs to be filled in if you are going to register the broadcaster with the broadcaster manager and do broadcaster class matching.
 
lldb::BroadcasterManagerSP GetManager ()
 
void SetPrimaryListener (lldb::ListenerSP listener_sp)
 
lldb::ListenerSP GetPrimaryListener ()
 

Protected Member Functions

PacketResult SendPacketAndWaitForResponseNoLock (llvm::StringRef payload, StringExtractorGDBRemote &response)
 
virtual void OnRunPacketSent (bool first)
 
- Protected Member Functions inherited from lldb_private::process_gdb_remote::GDBRemoteCommunication
PacketResult SendPacketNoLock (llvm::StringRef payload)
 
PacketResult SendNotificationPacketNoLock (llvm::StringRef notify_type, std::deque< std::string > &queue, llvm::StringRef payload)
 
PacketResult SendRawPacketNoLock (llvm::StringRef payload, bool skip_ack=false)
 
PacketResult ReadPacket (StringExtractorGDBRemote &response, Timeout< std::micro > timeout, bool sync_on_timeout)
 
PacketResult WaitForPacketNoLock (StringExtractorGDBRemote &response, Timeout< std::micro > timeout, bool sync_on_timeout)
 
bool CompressionIsEnabled ()
 
bool DecompressPacket ()
 
Status StartListenThread (const char *hostname="127.0.0.1", uint16_t port=0)
 
bool JoinListenThread ()
 
lldb::thread_result_t ListenThread ()
 
- Protected Member Functions inherited from lldb_private::Communication
size_t ReadFromConnection (void *dst, size_t dst_len, const Timeout< std::micro > &timeout, lldb::ConnectionStatus &status, Status *error_ptr)
 
- Protected Member Functions inherited from lldb_private::Broadcaster
BroadcasterImplSP GetBroadcasterImpl ()
 
const char * GetHijackingListenerName ()
 

Private Member Functions

bool ShouldStop (const UnixSignals &signals, StringExtractorGDBRemote &response)
 

Private Attributes

std::recursive_mutex m_async_mutex
 This handles the synchronization between individual async threads.
 
std::mutex m_mutex
 Variables handling synchronization between the Continue thread and any other threads wishing to send packets over the connection.
 
std::condition_variable m_cv
 
std::string m_continue_packet
 Packet with which to resume after an async interrupt.
 
std::chrono::time_point< std::chrono::steady_clock > m_interrupt_endpoint
 When was the interrupt packet sent.
 
uint32_t m_async_count
 Number of threads interested in sending.
 
bool m_is_running
 Whether the continue thread has control.
 
bool m_should_stop
 Whether we should resume after a stop.
 

Additional Inherited Members

- Static Public Member Functions inherited from lldb_private::process_gdb_remote::GDBRemoteCommunication
static llvm::Error ConnectLocally (GDBRemoteCommunication &client, GDBRemoteCommunication &server)
 
static std::string ExpandRLE (std::string)
 Expand GDB run-length encoding.
 
- Static Public Member Functions inherited from lldb_private::Communication
static std::string ConnectionStatusAsString (lldb::ConnectionStatus status)
 
- Protected Types inherited from lldb_private::Broadcaster
typedef std::shared_ptr< BroadcasterImplBroadcasterImplSP
 
typedef std::weak_ptr< BroadcasterImplBroadcasterImplWP
 
- Protected Attributes inherited from lldb_private::process_gdb_remote::GDBRemoteCommunication
std::chrono::seconds m_packet_timeout
 
uint32_t m_echo_number
 
LazyBool m_supports_qEcho
 
GDBRemoteCommunicationHistory m_history
 
bool m_send_acks
 
bool m_is_platform
 
std::string m_bytes
 
std::recursive_mutex m_bytes_mutex
 
CompressionType m_compression_type
 
- Protected Attributes inherited from lldb_private::Communication
lldb::ConnectionSP m_connection_sp
 The connection that is current in use by this communications class.
 
std::mutex m_write_mutex
 Don't let multiple threads write at the same time...
 
bool m_close_on_eof
 

Detailed Description

Definition at line 19 of file GDBRemoteClientBase.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
eBroadcastBitRunPacketSent 

Definition at line 21 of file GDBRemoteClientBase.h.

Constructor & Destructor Documentation

◆ GDBRemoteClientBase()

GDBRemoteClientBase::GDBRemoteClientBase ( const char *  comm_name)

Definition at line 34 of file GDBRemoteClientBase.cpp.

Member Function Documentation

◆ Interrupt()

bool GDBRemoteClientBase::Interrupt ( std::chrono::seconds  interrupt_timeout)

◆ OnRunPacketSent()

void GDBRemoteClientBase::OnRunPacketSent ( bool  first)
protectedvirtual

◆ ReadPacketWithOutputSupport()

GDBRemoteCommunication::PacketResult GDBRemoteClientBase::ReadPacketWithOutputSupport ( StringExtractorGDBRemote response,
Timeout< std::micro >  timeout,
bool  sync_on_timeout,
llvm::function_ref< void(llvm::StringRef)>  output_callback 
)

◆ SendAsyncSignal()

bool GDBRemoteClientBase::SendAsyncSignal ( int  signo,
std::chrono::seconds  interrupt_timeout 
)

◆ SendContinuePacketAndWaitForResponse()

StateType GDBRemoteClientBase::SendContinuePacketAndWaitForResponse ( ContinueDelegate delegate,
const UnixSignals signals,
llvm::StringRef  payload,
std::chrono::seconds  interrupt_timeout,
StringExtractorGDBRemote response 
)

Definition at line 38 of file GDBRemoteClientBase.cpp.

References lldb_private::process_gdb_remote::GDBRemoteClientBase::ContinueLock::Cancelled, StringExtractor::Clear(), StringExtractor::Empty(), lldb_private::process_gdb_remote::GDBRemoteCommunication::ErrorReplyTimeout, lldb::eStateExited, lldb::eStateInvalid, lldb::eStateStopped, lldb_private::process_gdb_remote::GDBRemoteClientBase::ContinueLock::Failed, StringExtractor::GetChar(), StringExtractor::GetHexByteString(), lldb_private::GetLog(), StringExtractor::GetStringRef(), lldb_private::process_gdb_remote::GDBRemoteClientBase::ContinueDelegate::HandleAsyncMisc(), lldb_private::process_gdb_remote::GDBRemoteClientBase::ContinueDelegate::HandleAsyncStdout(), lldb_private::process_gdb_remote::GDBRemoteClientBase::ContinueDelegate::HandleAsyncStructuredDataPacket(), lldb_private::process_gdb_remote::GDBRemoteClientBase::ContinueDelegate::HandleStopReply(), kWakeupInterval(), LLDB_LOGF, lldb_private::process_gdb_remote::GDBRemoteClientBase::ContinueLock::lock(), m_async_count, m_continue_packet, m_interrupt_endpoint, m_mutex, m_should_stop, OnRunPacketSent(), lldb_private::process_gdb_remote::Process, lldb_private::process_gdb_remote::GDBRemoteCommunication::ReadPacket(), StringExtractor::SetFilePos(), ShouldStop(), lldb_private::process_gdb_remote::GDBRemoteClientBase::ContinueLock::Success, lldb_private::process_gdb_remote::GDBRemoteCommunication::Success, and lldb_private::process_gdb_remote::GDBRemoteClientBase::ContinueLock::unlock().

Referenced by lldb_private::process_gdb_remote::ProcessGDBRemote::AsyncThread().

◆ SendPacketAndReceiveResponseWithOutputSupport()

GDBRemoteCommunication::PacketResult GDBRemoteClientBase::SendPacketAndReceiveResponseWithOutputSupport ( llvm::StringRef  payload,
StringExtractorGDBRemote response,
std::chrono::seconds  interrupt_timeout,
llvm::function_ref< void(llvm::StringRef)>  output_callback 
)

◆ SendPacketAndWaitForResponse()

GDBRemoteCommunication::PacketResult GDBRemoteClientBase::SendPacketAndWaitForResponse ( llvm::StringRef  payload,
StringExtractorGDBRemote response,
std::chrono::seconds  interrupt_timeout = std::chrono::seconds(0) 
)

Definition at line 181 of file GDBRemoteClientBase.cpp.

References lldb_private::process_gdb_remote::GDBRemoteCommunication::ErrorSendFailed, lldb_private::GetLog(), LLDB_LOGF, lldb_private::process_gdb_remote::Process, and SendPacketAndWaitForResponseNoLock().

Referenced by lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::AllocateMemory(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::AutoCompleteDiskFileOrDirectory(), lldb_private::process_gdb_remote::ProcessGDBRemote::BuildDynamicRegisterInfo(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::CalculateMD5(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::CloseFile(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::ConfigureRemoteStructuredData(), lldb_private::process_gdb_remote::ProcessGDBRemote::ConnectToDebugserver(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::CreateSymlink(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::DeallocateMemory(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::Detach(), CommandObjectProcessGDBRemotePacketSend::DoExecute(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoReadMemory(), lldb_private::process_gdb_remote::ProcessGDBRemote::DoWriteMemory(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::EnableErrorStringInPacket(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::FindProcesses(), lldb_private::process_gdb_remote::ProcessGDBRemote::FlashDone(), lldb_private::process_gdb_remote::ProcessGDBRemote::FlashErase(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::FStat(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetCurrentProcessID(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetCurrentProcessInfo(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetDefaultThreadId(), lldb_private::process_gdb_remote::ProcessGDBRemote::GetDynamicLoaderProcessState(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetDynamicLoaderProcessStateSupported(), lldb_private::process_gdb_remote::ProcessGDBRemote::GetExtendedInfoForThread(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetFileExists(), lldb_private::process_gdb_remote::ProcessGDBRemote::GetFileLoadAddress(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetFilePermissions(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetFileSize(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetGDBServerVersion(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetGroupName(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetHostInfo(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetListThreadsInStopReplySupported(), lldb_private::process_gdb_remote::ProcessGDBRemote::GetLoadedDynamicLibrariesInfos_sender(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetLoadedDynamicLibrariesInfosSupported(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetMemoryRegionInfo(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetModuleInfo(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetModulesInfo(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetProcessInfo(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetQOffsets(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetRemoteQSupported(), lldb_private::process_gdb_remote::ProcessGDBRemote::GetSharedCacheInfo(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetSharedCacheInfoSupported(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetShlibInfoAddr(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetStopReply(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetSupportedStructuredDataPlugins(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetSyncThreadStateSupported(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetThreadExtendedInfoSupported(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetThreadsInfo(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetThreadStopInfo(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetThreadSuffixSupported(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetUserName(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetVAttachOrWaitSupported(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetVContSupported(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetWatchpointSlotCount(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetWorkingDir(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetxPacketSupported(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::KillProcess(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::KillSpawnedProcess(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::LaunchGDBServer(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::LaunchProcess(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::MakeDirectory(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::MaybeEnableCompression(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::OpenFile(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::QueryGDBServer(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::QueryNoAckModeSupported(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::ReadExtFeature(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::ReadFile(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::ReadMemoryTags(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::RunShellCommand(), lldb_private::process_gdb_remote::ProcessGDBRemote::SaveCore(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::SendEnvironmentPacket(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::SendGDBStoppointTypePacket(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::SendLaunchArchPacket(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::SendLaunchEventDataPacket(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::SendSetCurrentThreadPacket(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::SendSignalsToIgnore(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::SendSpeedTestPacket(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::SendStdinNotification(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::SendTraceGetBinaryData(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::SendTraceGetState(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::SendTraceStart(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::SendTraceStop(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::SendTraceSupported(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::SetDetachOnError(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::SetDisableASLR(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::SetFilePermissions(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::SetSTDERR(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::SetSTDIN(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::SetSTDOUT(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::SetWorkingDir(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::SyncThreadState(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::TestPacketSpeed(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::Unlink(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::WriteFile(), and lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::WriteMemoryTags().

◆ SendPacketAndWaitForResponseNoLock()

GDBRemoteCommunication::PacketResult GDBRemoteClientBase::SendPacketAndWaitForResponseNoLock ( llvm::StringRef  payload,
StringExtractorGDBRemote response 
)
protected

◆ ShouldStop()

bool GDBRemoteClientBase::ShouldStop ( const UnixSignals signals,
StringExtractorGDBRemote response 
)
private

Member Data Documentation

◆ m_async_count

uint32_t lldb_private::process_gdb_remote::GDBRemoteClientBase::m_async_count
private

Number of threads interested in sending.

Definition at line 138 of file GDBRemoteClientBase.h.

Referenced by SendContinuePacketAndWaitForResponse(), and ShouldStop().

◆ m_async_mutex

std::recursive_mutex lldb_private::process_gdb_remote::GDBRemoteClientBase::m_async_mutex
private

This handles the synchronization between individual async threads.

For now they just use a simple mutex.

Definition at line 149 of file GDBRemoteClientBase.h.

◆ m_continue_packet

std::string lldb_private::process_gdb_remote::GDBRemoteClientBase::m_continue_packet
private

Packet with which to resume after an async interrupt.

Can be changed by an async thread e.g. to inject a signal.

Definition at line 131 of file GDBRemoteClientBase.h.

Referenced by SendAsyncSignal(), and SendContinuePacketAndWaitForResponse().

◆ m_cv

std::condition_variable lldb_private::process_gdb_remote::GDBRemoteClientBase::m_cv
private

Definition at line 127 of file GDBRemoteClientBase.h.

◆ m_interrupt_endpoint

std::chrono::time_point<std::chrono::steady_clock> lldb_private::process_gdb_remote::GDBRemoteClientBase::m_interrupt_endpoint
private

When was the interrupt packet sent.

Used to make sure we time out if the stub does not respond to interrupt requests.

Definition at line 135 of file GDBRemoteClientBase.h.

Referenced by SendContinuePacketAndWaitForResponse().

◆ m_is_running

bool lldb_private::process_gdb_remote::GDBRemoteClientBase::m_is_running
private

Whether the continue thread has control.

Definition at line 141 of file GDBRemoteClientBase.h.

◆ m_mutex

std::mutex lldb_private::process_gdb_remote::GDBRemoteClientBase::m_mutex
private

Variables handling synchronization between the Continue thread and any other threads wishing to send packets over the connection.

Either the continue thread has control over the connection (m_is_running == true) or the connection is free for an arbitrary number of other senders to take which indicate their interest by incrementing m_async_count.

Semantics of individual states:

  • m_continue_packet == false, m_async_count == 0: connection is free
  • m_continue_packet == true, m_async_count == 0: only continue thread is present
  • m_continue_packet == true, m_async_count > 0: continue thread has control, async threads should interrupt it and wait for it to set m_continue_packet to false
  • m_continue_packet == false, m_async_count > 0: async threads have control, continue thread needs to wait for them to finish (m_async_count goes down to 0).

Definition at line 126 of file GDBRemoteClientBase.h.

Referenced by SendContinuePacketAndWaitForResponse(), and ShouldStop().

◆ m_should_stop

bool lldb_private::process_gdb_remote::GDBRemoteClientBase::m_should_stop
private

Whether we should resume after a stop.

Definition at line 144 of file GDBRemoteClientBase.h.

Referenced by Interrupt(), and SendContinuePacketAndWaitForResponse().


The documentation for this class was generated from the following files: