9#ifndef LLDB_SOURCE_PLUGINS_PROCESS_GDB_REMOTE_GDBREMOTECOMMUNICATION_H
10#define LLDB_SOURCE_PLUGINS_PROCESS_GDB_REMOTE_GDBREMOTECOMMUNICATION_H
14#include "lldb/Host/Config.h"
61 "size of GDBRemoteFStatData is not 64");
64#define HANDLE_ERRNO(name, value) GDB_##name = value,
65#include "Plugins/Process/gdb-remote/GDBRemoteErrno.def"
69class ProcessGDBRemote;
95 std::chrono::seconds timeout);
132 return old_packet_timeout;
142 const Args *inferior_args);
147 static std::optional<std::string>
ExpandRLE(std::string);
165 std::deque<std::string>& queue,
166 llvm::StringRef payload);
168 bool skip_ack =
false);
175 bool sync_on_timeout);
193#if HAVE_LIBCOMPRESSION
195 void *m_decompression_scratch =
nullptr;
208struct format_provider<
209 lldb_private::process_gdb_remote::GDBRemoteCommunication::PacketResult> {
211 GDBRemoteCommunication::PacketResult &state,
212 raw_ostream &
Stream, StringRef Style);
A command line argument class.
Communication()
Construct the Communication object.
A stream class that can stream formatted output to a file.
The history keeps a circular buffer of GDB remote packets.
std::chrono::seconds m_saved_timeout
GDBRemoteCommunication & m_gdb_comm
ScopedTimeout(GDBRemoteCommunication &gdb_comm, std::chrono::seconds timeout)
std::chrono::seconds SetPacketTimeout(std::chrono::seconds packet_timeout)
GDBRemoteCommunication(const GDBRemoteCommunication &)=delete
PacketResult ReadPacket(StringExtractorGDBRemote &response, Timeout< std::micro > timeout, bool sync_on_timeout)
char CalculcateChecksum(llvm::StringRef payload)
~GDBRemoteCommunication() override
PacketResult SendNotificationPacketNoLock(llvm::StringRef notify_type, std::deque< std::string > &queue, llvm::StringRef payload)
std::recursive_mutex m_bytes_mutex
PacketResult WaitForPacketNoLock(StringExtractorGDBRemote &response, Timeout< std::micro > timeout, bool sync_on_timeout)
void DumpHistory(Stream &strm)
bool CompressionIsEnabled()
LazyBool m_supports_qEcho
PacketResult SendRawPacketNoLock(llvm::StringRef payload, bool skip_ack=false)
CompressionType m_compression_type
static Status StartDebugserverProcess(std::variant< llvm::StringRef, shared_fd_t > comm, ProcessLaunchInfo &launch_info, const Args *inferior_args)
PacketResult SendPacketNoLock(llvm::StringRef payload)
const GDBRemoteCommunication & operator=(const GDBRemoteCommunication &)=delete
static std::optional< std::string > ExpandRLE(std::string)
Expand GDB run-length encoding.
std::chrono::seconds GetPacketTimeout() const
std::chrono::seconds m_packet_timeout
PacketType CheckForPacket(const uint8_t *src, size_t src_len, StringExtractorGDBRemote &packet)
GDBRemoteCommunicationHistory m_history
A class that represents a running process on the host machine.
llvm::support::ubig32_t gdb_st_ctime
llvm::support::ubig32_t gdb_st_dev
llvm::support::ubig64_t gdb_st_blksize
llvm::support::ubig64_t gdb_st_blocks
llvm::support::ubig32_t gdb_st_ino
llvm::support::ubig32_t gdb_st_gid
llvm::support::ubig32_t gdb_st_mtime
llvm::support::ubig32_t gdb_st_atime
llvm::support::ubig32_t gdb_st_uid
llvm::support::ubig32_t gdb_st_nlink
llvm::support::ubig32_t gdb_st_rdev
llvm::support::ubig64_t gdb_st_size
llvm::support::ubig32_t gdb_st_mode