LLDB mainline
|
#include <GDBRemoteClientBase.h>
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), bool sync_on_timeout=true) |
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 |
void | DumpHistory (Stream &strm) |
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::Connection * | GetConnection () |
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 llvm::StringRef | GetBroadcasterClass () 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, bool sync_on_timeout=true) |
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 () |
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 Status | StartDebugserverProcess (std::variant< llvm::StringRef, shared_fd_t > comm, ProcessLaunchInfo &launch_info, const Args *inferior_args) |
static std::optional< 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< BroadcasterImpl > | BroadcasterImplSP |
typedef std::weak_ptr< BroadcasterImpl > | BroadcasterImplWP |
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 |
Definition at line 24 of file GDBRemoteClientBase.h.
anonymous enum |
Enumerator | |
---|---|
eBroadcastBitRunPacketSent |
Definition at line 26 of file GDBRemoteClientBase.h.
GDBRemoteClientBase::GDBRemoteClientBase | ( | const char * | comm_name | ) |
Definition at line 34 of file GDBRemoteClientBase.cpp.
References lldb_private::Broadcaster::Broadcaster(), lldb_private::process_gdb_remote::GDBRemoteCommunication::GDBRemoteCommunication(), m_async_count, m_is_running, and m_should_stop.
Referenced by lldb_private::process_gdb_remote::GDBRemoteClientBase::ContinueLock::ContinueLock(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GDBRemoteCommunicationClient(), and lldb_private::process_gdb_remote::GDBRemoteClientBase::Lock::Lock().
bool GDBRemoteClientBase::Interrupt | ( | std::chrono::seconds | interrupt_timeout | ) |
Definition at line 172 of file GDBRemoteClientBase.cpp.
References lldb_private::process_gdb_remote::GDBRemoteClientBase::Lock::DidInterrupt(), and m_should_stop.
|
protectedvirtual |
Reimplemented in lldb_private::process_gdb_remote::GDBRemoteCommunicationClient.
Definition at line 298 of file GDBRemoteClientBase.cpp.
References lldb_private::Broadcaster::BroadcastEvent(), and eBroadcastBitRunPacketSent.
Referenced by lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::OnRunPacketSent(), and SendContinuePacketAndWaitForResponse().
GDBRemoteCommunication::PacketResult GDBRemoteClientBase::ReadPacketWithOutputSupport | ( | StringExtractorGDBRemote & | response, |
Timeout< std::micro > | timeout, | ||
bool | sync_on_timeout, | ||
llvm::function_ref< void(llvm::StringRef)> | output_callback ) |
Definition at line 198 of file GDBRemoteClientBase.cpp.
References StringExtractor::GetChar(), StringExtractor::GetHexByteString(), StringExtractorGDBRemote::IsNormalResponse(), StringExtractor::PeekChar(), lldb_private::process_gdb_remote::GDBRemoteCommunication::ReadPacket(), and lldb_private::process_gdb_remote::GDBRemoteCommunication::Success.
Referenced by SendPacketAndReceiveResponseWithOutputSupport().
bool GDBRemoteClientBase::SendAsyncSignal | ( | int | signo, |
std::chrono::seconds | interrupt_timeout ) |
Definition at line 160 of file GDBRemoteClientBase.cpp.
References lldb_private::process_gdb_remote::GDBRemoteClientBase::Lock::DidInterrupt(), and m_continue_packet.
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().
GDBRemoteCommunication::PacketResult GDBRemoteClientBase::SendPacketAndReceiveResponseWithOutputSupport | ( | llvm::StringRef | payload, |
StringExtractorGDBRemote & | response, | ||
std::chrono::seconds | interrupt_timeout, | ||
llvm::function_ref< void(llvm::StringRef)> | output_callback ) |
Definition at line 215 of file GDBRemoteClientBase.cpp.
References lldb_private::process_gdb_remote::GDBRemoteCommunication::ErrorSendFailed, lldb_private::GetLog(), lldb_private::process_gdb_remote::GDBRemoteCommunication::GetPacketTimeout(), LLDB_LOGF, lldb_private::process_gdb_remote::Process, ReadPacketWithOutputSupport(), lldb_private::process_gdb_remote::GDBRemoteCommunication::SendPacketNoLock(), and lldb_private::process_gdb_remote::GDBRemoteCommunication::Success.
Referenced by CommandObjectProcessGDBRemotePacketMonitor::DoExecute().
GDBRemoteCommunication::PacketResult GDBRemoteClientBase::SendPacketAndWaitForResponse | ( | llvm::StringRef | payload, |
StringExtractorGDBRemote & | response, | ||
std::chrono::seconds | interrupt_timeout = std::chrono::seconds(0), | ||
bool | sync_on_timeout = true ) |
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::GDBRemoteCommunicationClient::CalculateMD5(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::CloseFile(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::ConfigureRemoteStructuredData(), 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::GDBRemoteCommunicationClient::EnableErrorStringInPacket(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::FindProcesses(), 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::GDBRemoteCommunicationClient::GetDynamicLoaderProcessStateSupported(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetFileExists(), 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::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::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::GetxPacketState(), 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::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().
|
protected |
Definition at line 238 of file GDBRemoteClientBase.cpp.
References lldb_private::GetLog(), lldb_private::process_gdb_remote::GDBRemoteCommunication::GetPacketTimeout(), StringExtractor::GetStringRef(), LLDB_LOGF, lldb_private::process_gdb_remote::Packets, lldb_private::process_gdb_remote::GDBRemoteCommunication::ReadPacket(), lldb_private::process_gdb_remote::GDBRemoteCommunication::SendPacketNoLock(), lldb_private::process_gdb_remote::GDBRemoteCommunication::Success, and StringExtractorGDBRemote::ValidateResponse().
Referenced by lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::GetCurrentProcessAndThreadIDs(), SendPacketAndWaitForResponse(), lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::SendThreadSpecificPacketAndWaitForResponse(), and lldb_private::process_gdb_remote::GDBRemoteCommunicationClient::ServeSymbolLookups().
|
private |
Definition at line 267 of file GDBRemoteClientBase.cpp.
References StringExtractor::GetHexU8(), lldb_private::UnixSignals::GetSignalNumberFromName(), m_async_count, m_mutex, and lldb_private::process_gdb_remote::GDBRemoteCommunication::ReadPacket().
Referenced by SendContinuePacketAndWaitForResponse().
|
private |
Number of threads interested in sending.
Definition at line 145 of file GDBRemoteClientBase.h.
Referenced by GDBRemoteClientBase(), SendContinuePacketAndWaitForResponse(), and ShouldStop().
|
private |
This handles the synchronization between individual async threads.
For now they just use a simple mutex.
Definition at line 156 of file GDBRemoteClientBase.h.
Referenced by lldb_private::process_gdb_remote::GDBRemoteClientBase::Lock::Lock().
|
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 138 of file GDBRemoteClientBase.h.
Referenced by SendAsyncSignal(), and SendContinuePacketAndWaitForResponse().
|
private |
Definition at line 134 of file GDBRemoteClientBase.h.
|
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 142 of file GDBRemoteClientBase.h.
Referenced by SendContinuePacketAndWaitForResponse().
|
private |
Whether the continue thread has control.
Definition at line 148 of file GDBRemoteClientBase.h.
Referenced by GDBRemoteClientBase().
|
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:
Definition at line 133 of file GDBRemoteClientBase.h.
Referenced by SendContinuePacketAndWaitForResponse(), and ShouldStop().
|
private |
Whether we should resume after a stop.
Definition at line 151 of file GDBRemoteClientBase.h.
Referenced by GDBRemoteClientBase(), Interrupt(), and SendContinuePacketAndWaitForResponse().