#include "GDBRemoteClientBase.h"
#include "llvm/ADT/StringExtras.h"
#include "lldb/Target/UnixSignals.h"
#include "lldb/Utility/LLDBAssert.h"
#include "ProcessGDBRemoteLog.h"
usingnamespacelldb;
usingnamespacelldb_private;
usingnamespacelldb_private::process_gdb_remote;
usingnamespacestd::chrono;
static const seconds kWakeupInterval(5);
GDBRemoteClientBase::ContinueDelegate::~ContinueDelegate() = default;
GDBRemoteClientBase::GDBRemoteClientBase(const char *comm_name)
: … { … }
StateType GDBRemoteClientBase::SendContinuePacketAndWaitForResponse(
ContinueDelegate &delegate, const UnixSignals &signals,
llvm::StringRef payload, std::chrono::seconds interrupt_timeout,
StringExtractorGDBRemote &response) { … }
bool GDBRemoteClientBase::SendAsyncSignal(
int signo, std::chrono::seconds interrupt_timeout) { … }
bool GDBRemoteClientBase::Interrupt(std::chrono::seconds interrupt_timeout) { … }
GDBRemoteCommunication::PacketResult
GDBRemoteClientBase::SendPacketAndWaitForResponse(
llvm::StringRef payload, StringExtractorGDBRemote &response,
std::chrono::seconds interrupt_timeout) { … }
GDBRemoteCommunication::PacketResult
GDBRemoteClientBase::ReadPacketWithOutputSupport(
StringExtractorGDBRemote &response, Timeout<std::micro> timeout,
bool sync_on_timeout,
llvm::function_ref<void(llvm::StringRef)> output_callback) { … }
GDBRemoteCommunication::PacketResult
GDBRemoteClientBase::SendPacketAndReceiveResponseWithOutputSupport(
llvm::StringRef payload, StringExtractorGDBRemote &response,
std::chrono::seconds interrupt_timeout,
llvm::function_ref<void(llvm::StringRef)> output_callback) { … }
GDBRemoteCommunication::PacketResult
GDBRemoteClientBase::SendPacketAndWaitForResponseNoLock(
llvm::StringRef payload, StringExtractorGDBRemote &response) { … }
bool GDBRemoteClientBase::ShouldStop(const UnixSignals &signals,
StringExtractorGDBRemote &response) { … }
void GDBRemoteClientBase::OnRunPacketSent(bool first) { … }
GDBRemoteClientBase::ContinueLock::ContinueLock(GDBRemoteClientBase &comm)
: … { … }
GDBRemoteClientBase::ContinueLock::~ContinueLock() { … }
void GDBRemoteClientBase::ContinueLock::unlock() { … }
GDBRemoteClientBase::ContinueLock::LockResult
GDBRemoteClientBase::ContinueLock::lock() { … }
GDBRemoteClientBase::Lock::Lock(GDBRemoteClientBase &comm,
std::chrono::seconds interrupt_timeout)
: … { … }
void GDBRemoteClientBase::Lock::SyncWithContinueThread() { … }
GDBRemoteClientBase::Lock::~Lock() { … }