#include "GDBRemoteCommunicationServerPlatform.h"
#include <cerrno>
#include <chrono>
#include <csignal>
#include <cstring>
#include <mutex>
#include <optional>
#include <sstream>
#include <thread>
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/JSON.h"
#include "llvm/Support/Threading.h"
#include "lldb/Host/Config.h"
#include "lldb/Host/ConnectionFileDescriptor.h"
#include "lldb/Host/FileAction.h"
#include "lldb/Host/Host.h"
#include "lldb/Host/HostInfo.h"
#include "lldb/Interpreter/CommandCompletions.h"
#include "lldb/Target/Platform.h"
#include "lldb/Target/UnixSignals.h"
#include "lldb/Utility/GDBRemote.h"
#include "lldb/Utility/LLDBLog.h"
#include "lldb/Utility/Log.h"
#include "lldb/Utility/StreamString.h"
#include "lldb/Utility/StructuredData.h"
#include "lldb/Utility/TildeExpressionResolver.h"
#include "lldb/Utility/UriParser.h"
#include "lldb/Utility/StringExtractorGDBRemote.h"
usingnamespacelldb;
usingnamespacelldb_private::process_gdb_remote;
usingnamespacelldb_private;
GDBRemoteCommunicationServerPlatform::GDBRemoteCommunicationServerPlatform(
const Socket::SocketProtocol socket_protocol, uint16_t gdbserver_port)
: … { … }
GDBRemoteCommunicationServerPlatform::~GDBRemoteCommunicationServerPlatform() =
default;
Status GDBRemoteCommunicationServerPlatform::LaunchGDBServer(
const lldb_private::Args &args, lldb::pid_t &pid, std::string &socket_name,
shared_fd_t fd) { … }
GDBRemoteCommunication::PacketResult
GDBRemoteCommunicationServerPlatform::Handle_qLaunchGDBServer(
StringExtractorGDBRemote &packet) { … }
GDBRemoteCommunication::PacketResult
GDBRemoteCommunicationServerPlatform::Handle_qQueryGDBServer(
StringExtractorGDBRemote &packet) { … }
GDBRemoteCommunication::PacketResult
GDBRemoteCommunicationServerPlatform::Handle_qKillSpawnedProcess(
StringExtractorGDBRemote &packet) { … }
void GDBRemoteCommunicationServerPlatform::AddSpawnedProcess(lldb::pid_t pid) { … }
bool GDBRemoteCommunicationServerPlatform::SpawnedProcessIsRunning(
lldb::pid_t pid) { … }
bool GDBRemoteCommunicationServerPlatform::KillSpawnedProcess(lldb::pid_t pid) { … }
GDBRemoteCommunication::PacketResult
GDBRemoteCommunicationServerPlatform::Handle_qProcessInfo(
StringExtractorGDBRemote &packet) { … }
GDBRemoteCommunication::PacketResult
GDBRemoteCommunicationServerPlatform::Handle_qPathComplete(
StringExtractorGDBRemote &packet) { … }
GDBRemoteCommunication::PacketResult
GDBRemoteCommunicationServerPlatform::Handle_qGetWorkingDir(
StringExtractorGDBRemote &packet) { … }
GDBRemoteCommunication::PacketResult
GDBRemoteCommunicationServerPlatform::Handle_QSetWorkingDir(
StringExtractorGDBRemote &packet) { … }
GDBRemoteCommunication::PacketResult
GDBRemoteCommunicationServerPlatform::Handle_qC(
StringExtractorGDBRemote &packet) { … }
GDBRemoteCommunication::PacketResult
GDBRemoteCommunicationServerPlatform::Handle_jSignalsInfo(
StringExtractorGDBRemote &packet) { … }
void GDBRemoteCommunicationServerPlatform::DebugserverProcessReaped(
lldb::pid_t pid) { … }
Status GDBRemoteCommunicationServerPlatform::LaunchProcess() { … }
const FileSpec &GDBRemoteCommunicationServerPlatform::GetDomainSocketDir() { … }
FileSpec
GDBRemoteCommunicationServerPlatform::GetDomainSocketPath(const char *prefix) { … }
void GDBRemoteCommunicationServerPlatform::SetPendingGdbServer(
const std::string &socket_name) { … }