9#ifndef LLDB_SOURCE_PLUGINS_PROCESS_GDB_REMOTE_GDBREMOTECOMMUNICATIONSERVERLLGS_H
10#define LLDB_SOURCE_PLUGINS_PROCESS_GDB_REMOTE_GDBREMOTECOMMUNICATIONSERVERLLGS_H
13#include <unordered_map>
14#include <unordered_set>
28namespace process_gdb_remote {
30class ProcessGDBRemote;
85 std::unique_ptr<NativeProcessProtocol> child_process)
override;
140 bool force_synchronous);
144 bool force_synchronous);
287 llvm::Expected<std::unique_ptr<llvm::MemoryBuffer>>
293 const llvm::ArrayRef<llvm::StringRef> client_features)
override;
303 llvm::Expected<std::unique_ptr<llvm::MemoryBuffer>>
BuildTargetXml();
337std::string
LLGSArgToURL(llvm::StringRef url_arg,
bool reverse_connect);
An architecture specification class.
An abstract communications class.
std::unique_ptr< ReadHandle > ReadHandleUP
Extension
Extension flag constants, returned by Manager::GetSupportedExtensions() and passed to SetEnabledExten...
A stream class that can stream formatted output to a file.
GDBRemoteCommunicationServerLLGS(const GDBRemoteCommunicationServerLLGS &)=delete
PacketResult Handle_QMemTags(StringExtractorGDBRemote &packet)
PacketResult Handle_qVAttachOrWaitSupported(StringExtractorGDBRemote &packet)
PacketResult Handle_vStdio(StringExtractorGDBRemote &packet)
PacketResult HandleNotificationAck(std::deque< std::string > &queue)
PacketResult Handle_QSetDisableASLR(StringExtractorGDBRemote &packet)
void SetLaunchInfo(const ProcessLaunchInfo &info)
PacketResult SendONotification(const char *buffer, uint32_t len)
PacketResult Handle_D(StringExtractorGDBRemote &packet)
NativeProcessProtocol::Extension m_extensions_supported
PacketResult Handle_qMemTags(StringExtractorGDBRemote &packet)
void AddProcessThreads(StreamGDBRemote &response, NativeProcessProtocol &process, bool &had_any)
llvm::StringMap< std::unique_ptr< llvm::MemoryBuffer > > m_xfer_buffer_map
PacketResult SendStopReasonForState(NativeProcessProtocol &process, lldb::StateType process_state, bool force_synchronous)
void EnqueueStopReplyPackets(lldb::tid_t thread_to_skip)
PacketResult Handle_jLLDBTraceGetBinaryData(StringExtractorGDBRemote &packet)
PacketResult Handle_qfThreadInfo(StringExtractorGDBRemote &packet)
StreamString PrepareStopReplyPacketForThread(NativeThreadProtocol &thread)
uint8_t m_reg_bytes[RegisterValue::kMaxRegisterByteSize]
PacketResult Handle__m(StringExtractorGDBRemote &packet)
PacketResult Handle_g(StringExtractorGDBRemote &packet)
uint32_t m_next_saved_registers_id
void RegisterPacketHandlers()
PacketResult Handle_qMemoryRegionInfoSupported(StringExtractorGDBRemote &packet)
PacketResult Handle_qThreadStopInfo(StringExtractorGDBRemote &packet)
PacketResult Handle_c(StringExtractorGDBRemote &packet)
PacketResult Handle_QThreadSuffixSupported(StringExtractorGDBRemote &packet)
PacketResult Handle_interrupt(StringExtractorGDBRemote &packet)
PacketResult Handle_vKill(StringExtractorGDBRemote &packet)
std::unordered_map< lldb::pid_t, DebuggedProcess > m_debugged_processes
void InitializeDelegate(NativeProcessProtocol *process) override
FileSpec FindModuleFile(const std::string &module_path, const ArchSpec &arch) override
PacketResult Handle_vAttachOrWait(StringExtractorGDBRemote &packet)
PacketResult Handle_vAttach(StringExtractorGDBRemote &packet)
PacketResult Handle_stop_reason(StringExtractorGDBRemote &packet)
PacketResult Handle_jLLDBTraceSupported(StringExtractorGDBRemote &packet)
std::deque< std::string > m_stop_notification_queue
PacketResult Handle_qsThreadInfo(StringExtractorGDBRemote &packet)
PacketResult Handle_vStopped(StringExtractorGDBRemote &packet)
PacketResult Handle_z(StringExtractorGDBRemote &packet)
bool m_disabling_non_stop
lldb::tid_t GetContinueThreadID() const
PacketResult Handle_H(StringExtractorGDBRemote &packet)
void StopSTDIOForwarding()
PacketResult SendContinueSuccessResponse()
PacketResult Handle_jLLDBTraceGetState(StringExtractorGDBRemote &packet)
std::deque< std::string > m_stdio_notification_queue
bool m_list_threads_in_stop_reply
PacketResult Handle_qFileLoadAddress(StringExtractorGDBRemote &packet)
void NewSubprocess(NativeProcessProtocol *parent_process, std::unique_ptr< NativeProcessProtocol > child_process) override
PacketResult Handle_qC(StringExtractorGDBRemote &packet)
static std::string XMLEncodeAttributeValue(llvm::StringRef value)
NativeThreadProtocol * GetThreadFromSuffix(StringExtractorGDBRemote &packet)
Status SetSTDIOFileDescriptor(int fd)
lldb::tid_t GetCurrentThreadID() const
PacketResult Handle_QNonStop(StringExtractorGDBRemote &packet)
Status AttachToProcess(lldb::pid_t pid)
Attach to a process.
PacketResult SendWResponse(NativeProcessProtocol *process)
PacketResult Handle_s(StringExtractorGDBRemote &packet)
Status InitializeConnection(std::unique_ptr< Connection > connection)
bool m_thread_suffix_supported
void HandleInferiorState_Exited(NativeProcessProtocol *process)
lldb::tid_t m_continue_tid
PacketResult Handle_P(StringExtractorGDBRemote &packet)
PacketResult Handle_qSaveCore(StringExtractorGDBRemote &packet)
NativeProcessProtocol * m_current_process
void HandleInferiorState_Stopped(NativeProcessProtocol *process)
NativeProcessProtocol * m_continue_process
PacketResult Handle_vCont(StringExtractorGDBRemote &packet)
PacketResult Handle_vCont_actions(StringExtractorGDBRemote &packet)
PacketResult Handle_vCtrlC(StringExtractorGDBRemote &packet)
PacketResult Handle_jLLDBTraceStart(StringExtractorGDBRemote &packet)
Status LaunchProcess() override
Launch a process with the current launch settings.
PacketResult Handle_qGetWorkingDir(StringExtractorGDBRemote &packet)
void DataAvailableCallback()
PacketResult Handle_jThreadsInfo(StringExtractorGDBRemote &packet)
PacketResult Handle_M(StringExtractorGDBRemote &packet)
void DidExec(NativeProcessProtocol *process) override
PacketResult Handle_memory_read(StringExtractorGDBRemote &packet)
Status AttachWaitProcess(llvm::StringRef process_name, bool include_existing)
Wait to attach to a process with a given name.
PacketResult Handle_vAttachWait(StringExtractorGDBRemote &packet)
const GDBRemoteCommunicationServerLLGS & operator=(const GDBRemoteCommunicationServerLLGS &)=delete
PacketResult ResumeProcess(NativeProcessProtocol &process, const ResumeActionList &actions)
PacketResult Handle_QListThreadsInStopReply(StringExtractorGDBRemote &packet)
PacketResult Handle_jLLDBTraceStop(StringExtractorGDBRemote &packet)
PacketResult Handle_T(StringExtractorGDBRemote &packet)
PacketResult Handle_QSetWorkingDir(StringExtractorGDBRemote &packet)
PacketResult Handle_k(StringExtractorGDBRemote &packet)
PacketResult Handle_qXfer(StringExtractorGDBRemote &packet)
PacketResult SendStopReplyPacketForThread(NativeProcessProtocol &process, lldb::tid_t tid, bool force_synchronous)
void StartSTDIOForwarding()
PacketResult Handle_C(StringExtractorGDBRemote &packet)
PacketResult Handle__M(StringExtractorGDBRemote &packet)
void AppendThreadIDToResponse(Stream &response, lldb::pid_t pid, lldb::tid_t tid)
std::vector< std::string > HandleFeatures(const llvm::ArrayRef< llvm::StringRef > client_features) override
void ClearProcessSpecificData()
PacketResult Handle_Z(StringExtractorGDBRemote &packet)
PacketResult Handle_QPassSignals(StringExtractorGDBRemote &packet)
PacketResult Handle_qWatchpointSupportInfo(StringExtractorGDBRemote &packet)
void ProcessStateChanged(NativeProcessProtocol *process, lldb::StateType state) override
lldb::tid_t m_current_tid
void SetEnabledExtensions(NativeProcessProtocol &process)
std::unordered_map< uint32_t, lldb::DataBufferSP > m_saved_registers_map
PacketResult Handle_QRestoreRegisterState(StringExtractorGDBRemote &packet)
NativeProcessProtocol::Manager & m_process_manager
void SetContinueThreadID(lldb::tid_t tid)
PacketResult Handle_p(StringExtractorGDBRemote &packet)
PacketResult Handle_qRegisterInfo(StringExtractorGDBRemote &packet)
void SetCurrentThreadID(lldb::tid_t tid)
std::mutex m_saved_registers_mutex
PacketResult Handle_qProcessInfo(StringExtractorGDBRemote &packet)
PacketResult Handle_vRun(StringExtractorGDBRemote &packet)
MainLoop::ReadHandleUP m_stdio_handle_up
void MaybeCloseInferiorTerminalConnection()
MainLoop::ReadHandleUP m_network_handle_up
PacketResult Handle_qMemoryRegionInfo(StringExtractorGDBRemote &packet)
llvm::Expected< std::unique_ptr< llvm::MemoryBuffer > > ReadXferObject(llvm::StringRef object, llvm::StringRef annex)
PacketResult Handle_QSaveRegisterState(StringExtractorGDBRemote &packet)
std::recursive_mutex m_debugged_process_mutex
uint32_t GetNextSavedRegistersID()
Communication m_stdio_communication
llvm::Expected< std::unique_ptr< llvm::MemoryBuffer > > BuildTargetXml()
PacketResult Handle_I(StringExtractorGDBRemote &packet)
#define LLDB_INVALID_THREAD_ID
std::string LLGSArgToURL(llvm::StringRef url_arg, bool reverse_connect)
A class that represents a running process on the host machine.
@ LLVM_MARK_AS_BITMASK_ENUM
StateType
Process and Thread States.
std::unique_ptr< NativeProcessProtocol > process_up