LLDB  mainline
GDBRemoteCommunicationServerLLGS.h
Go to the documentation of this file.
1 //===-- GDBRemoteCommunicationServerLLGS.h ----------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLDB_SOURCE_PLUGINS_PROCESS_GDB_REMOTE_GDBREMOTECOMMUNICATIONSERVERLLGS_H
10 #define LLDB_SOURCE_PLUGINS_PROCESS_GDB_REMOTE_GDBREMOTECOMMUNICATIONSERVERLLGS_H
11 
12 #include <mutex>
13 #include <unordered_map>
14 #include <unordered_set>
15 
17 #include "lldb/Host/MainLoop.h"
20 
22 
24 
25 namespace lldb_private {
26 
27 namespace process_gdb_remote {
28 
29 class ProcessGDBRemote;
30 
34 public:
35  // Constructors and Destructors
37  MainLoop &mainloop,
38  const NativeProcessProtocol::Factory &process_factory);
39 
40  void SetLaunchInfo(const ProcessLaunchInfo &info);
41 
42  /// Launch a process with the current launch settings.
43  ///
44  /// This method supports running an lldb-gdbserver or similar
45  /// server in a situation where the startup code has been provided
46  /// with all the information for a child process to be launched.
47  ///
48  /// \return
49  /// An Status object indicating the success or failure of the
50  /// launch.
51  Status LaunchProcess() override;
52 
53  /// Attach to a process.
54  ///
55  /// This method supports attaching llgs to a process accessible via the
56  /// configured Platform.
57  ///
58  /// \return
59  /// An Status object indicating the success or failure of the
60  /// attach operation.
62 
63  /// Wait to attach to a process with a given name.
64  ///
65  /// This method supports waiting for the next instance of a process
66  /// with a given name and attaching llgs to that via the configured
67  /// Platform.
68  ///
69  /// \return
70  /// An Status object indicating the success or failure of the
71  /// attach operation.
72  Status AttachWaitProcess(llvm::StringRef process_name, bool include_existing);
73 
74  // NativeProcessProtocol::NativeDelegate overrides
75  void InitializeDelegate(NativeProcessProtocol *process) override;
76 
78  lldb::StateType state) override;
79 
80  void DidExec(NativeProcessProtocol *process) override;
81 
82  void
83  NewSubprocess(NativeProcessProtocol *parent_process,
84  std::unique_ptr<NativeProcessProtocol> child_process) override;
85 
86  Status InitializeConnection(std::unique_ptr<Connection> connection);
87 
88  struct DebuggedProcess {
89  enum class Flag {
90  vkilled = (1u << 0),
91 
93  };
94 
95  std::unique_ptr<NativeProcessProtocol> process_up;
97  };
98 
99 protected:
107  std::recursive_mutex m_debugged_process_mutex;
108  std::unordered_map<lldb::pid_t, DebuggedProcess> m_debugged_processes;
109 
112 
113  llvm::StringMap<std::unique_ptr<llvm::MemoryBuffer>> m_xfer_buffer_map;
115  std::unordered_map<uint32_t, lldb::DataBufferSP> m_saved_registers_map;
119  bool m_non_stop = false;
120  bool m_disabling_non_stop = false;
121  std::deque<std::string> m_stdio_notification_queue;
122  std::deque<std::string> m_stop_notification_queue;
123 
125 
126  PacketResult SendONotification(const char *buffer, uint32_t len);
127 
129 
131 
133  lldb::tid_t tid,
134  bool force_synchronous);
135 
137  lldb::StateType process_state,
138  bool force_synchronous);
139 
140  void EnqueueStopReplyPackets(lldb::tid_t thread_to_skip);
141 
143 
145 
147 
149 
151 
153 
155 
157 
159 
161  const ResumeActionList &actions);
162 
164 
166 
168 
170 
172 
174 
175  void AddProcessThreads(StreamGDBRemote &response,
176  NativeProcessProtocol &process, bool &had_any);
177 
179 
181 
183 
185 
187 
189 
191 
192  // Handles $m and $x packets.
194 
198 
201 
203 
205 
207 
209 
211 
213 
215 
217 
219 
221 
223 
225 
227 
229 
231 
233 
235 
237 
239 
241 
243 
245 
247 
249 
251 
252  PacketResult HandleNotificationAck(std::deque<std::string> &queue);
253 
255 
257 
259 
261 
263 
265 
267 
269 
271 
273 
275 
277 
278  FileSpec FindModuleFile(const std::string &module_path,
279  const ArchSpec &arch) override;
280 
281  llvm::Expected<std::unique_ptr<llvm::MemoryBuffer>>
282  ReadXferObject(llvm::StringRef object, llvm::StringRef annex);
283 
284  static std::string XMLEncodeAttributeValue(llvm::StringRef value);
285 
286  std::vector<std::string> HandleFeatures(
287  const llvm::ArrayRef<llvm::StringRef> client_features) override;
288 
289  // Provide a response for successful continue action, i.e. send "OK"
290  // in non-stop mode, no response otherwise.
292 
293  void AppendThreadIDToResponse(Stream &response, lldb::pid_t pid,
294  lldb::tid_t tid);
295 
296 private:
297  llvm::Expected<std::unique_ptr<llvm::MemoryBuffer>> BuildTargetXml();
298 
300 
302 
304 
306 
308 
310 
311  void RegisterPacketHandlers();
312 
313  void DataAvailableCallback();
314 
315  void SendProcessOutput();
316 
317  void StartSTDIOForwarding();
318 
319  void StopSTDIOForwarding();
320 
321  // Call SetEnabledExtensions() with appropriate flags on the process.
323 
324  // For GDBRemoteCommunicationServerLLGS only
326  delete;
329 };
330 
331 std::string LLGSArgToURL(llvm::StringRef url_arg, bool reverse_connect);
332 
333 } // namespace process_gdb_remote
334 } // namespace lldb_private
335 
336 #endif // LLDB_SOURCE_PLUGINS_PROCESS_GDB_REMOTE_GDBREMOTECOMMUNICATIONSERVERLLGS_H
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qFileLoadAddress
PacketResult Handle_qFileLoadAddress(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3670
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::AppendThreadIDToResponse
void AppendThreadIDToResponse(Stream &response, lldb::pid_t pid, lldb::tid_t tid)
Definition: GDBRemoteCommunicationServerLLGS.cpp:4270
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_interrupt
PacketResult Handle_interrupt(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:2452
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::ResumeProcess
PacketResult ResumeProcess(NativeProcessProtocol &process, const ResumeActionList &actions)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1526
lldb_private::NativeProcessProtocol::NativeDelegate
Definition: NativeProcessProtocol.h:236
lldb_private::ArchSpec
Definition: ArchSpec.h:32
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qfThreadInfo
PacketResult Handle_qfThreadInfo(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:2088
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_Z
PacketResult Handle_Z(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:2828
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::InitializeDelegate
void InitializeDelegate(NativeProcessProtocol *process) override
Definition: GDBRemoteCommunicationServerLLGS.cpp:462
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_QRestoreRegisterState
PacketResult Handle_QRestoreRegisterState(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3337
lldb_private::NativeThreadProtocol
Definition: NativeThreadProtocol.h:24
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::m_saved_registers_map
std::unordered_map< uint32_t, lldb::DataBufferSP > m_saved_registers_map
Definition: GDBRemoteCommunicationServerLLGS.h:115
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::m_mainloop
MainLoop & m_mainloop
Definition: GDBRemoteCommunicationServerLLGS.h:100
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_stop_reason
PacketResult Handle_stop_reason(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1883
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_vRun
PacketResult Handle_vRun(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3509
GDBRemoteCommunicationServerCommon.h
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::GetNextSavedRegistersID
uint32_t GetNextSavedRegistersID()
Definition: GDBRemoteCommunicationServerLLGS.cpp:4146
lldb_private::process_gdb_remote::GDBRemoteCommunication::PacketResult
PacketResult
Definition: GDBRemoteCommunication.h:87
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::m_debugged_process_mutex
std::recursive_mutex m_debugged_process_mutex
Definition: GDBRemoteCommunicationServerLLGS.h:107
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_p
PacketResult Handle_p(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:2169
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qMemoryRegionInfoSupported
PacketResult Handle_qMemoryRegionInfoSupported(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:2715
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_s
PacketResult Handle_s(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3009
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::SetContinueThreadID
void SetContinueThreadID(lldb::tid_t tid)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1875
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::m_stop_notification_queue
std::deque< std::string > m_stop_notification_queue
Definition: GDBRemoteCommunicationServerLLGS.h:122
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::SetCurrentThreadID
void SetCurrentThreadID(lldb::tid_t tid)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1866
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::GetContinueThreadID
lldb::tid_t GetContinueThreadID() const
Definition: GDBRemoteCommunicationServerLLGS.h:274
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_g
PacketResult Handle_g(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:2114
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qWatchpointSupportInfo
PacketResult Handle_qWatchpointSupportInfo(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3645
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::AttachWaitProcess
Status AttachWaitProcess(llvm::StringRef process_name, bool include_existing)
Wait to attach to a process with a given name.
Definition: GDBRemoteCommunicationServerLLGS.cpp:393
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qVAttachOrWaitSupported
PacketResult Handle_qVAttachOrWaitSupported(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3470
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::SendStopReasonForState
PacketResult SendStopReasonForState(NativeProcessProtocol &process, lldb::StateType process_state, bool force_synchronous)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1926
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::m_list_threads_in_stop_reply
bool m_list_threads_in_stop_reply
Definition: GDBRemoteCommunicationServerLLGS.h:118
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::m_thread_suffix_supported
bool m_thread_suffix_supported
Definition: GDBRemoteCommunicationServerLLGS.h:117
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::StartSTDIOForwarding
void StartSTDIOForwarding()
Definition: GDBRemoteCommunicationServerLLGS.cpp:1228
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::InitializeConnection
Status InitializeConnection(std::unique_ptr< Connection > connection)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1176
lldb_private::Stream
Definition: Stream.h:28
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::operator=
const GDBRemoteCommunicationServerLLGS & operator=(const GDBRemoteCommunicationServerLLGS &)=delete
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_QPassSignals
PacketResult Handle_QPassSignals(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3699
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_M
PacketResult Handle_M(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:2636
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qThreadStopInfo
PacketResult Handle_qThreadStopInfo(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3595
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerCommon
Definition: GDBRemoteCommunicationServerCommon.h:26
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qC
PacketResult Handle_qC(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1401
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::NewSubprocess
void NewSubprocess(NativeProcessProtocol *parent_process, std::unique_ptr< NativeProcessProtocol > child_process) override
Definition: GDBRemoteCommunicationServerLLGS.cpp:1142
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::DebuggedProcess::process_up
std::unique_ptr< NativeProcessProtocol > process_up
Definition: GDBRemoteCommunicationServerLLGS.h:95
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_QNonStop
PacketResult Handle_QNonStop(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3937
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_D
PacketResult Handle_D(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3543
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::m_stdio_handle_up
MainLoop::ReadHandleUP m_stdio_handle_up
Definition: GDBRemoteCommunicationServerLLGS.h:111
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::m_stdio_communication
Communication m_stdio_communication
Definition: GDBRemoteCommunicationServerLLGS.h:110
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_jLLDBTraceStart
PacketResult Handle_jLLDBTraceStart(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1315
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_C
PacketResult Handle_C(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1550
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::HandleInferiorState_Stopped
void HandleInferiorState_Stopped(NativeProcessProtocol *process)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1076
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::StopSTDIOForwarding
void StopSTDIOForwarding()
Definition: GDBRemoteCommunicationServerLLGS.cpp:1247
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_QSetDisableASLR
PacketResult Handle_QSetDisableASLR(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1478
lldb_private::MainLoopBase::ReadHandleUP
std::unique_ptr< ReadHandle > ReadHandleUP
Definition: MainLoopBase.h:44
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_vStopped
PacketResult Handle_vStopped(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:4000
lldb_private::Communication
Definition: Communication.h:39
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::m_saved_registers_mutex
std::mutex m_saved_registers_mutex
Definition: GDBRemoteCommunicationServerLLGS.h:114
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_T
PacketResult Handle_T(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:4027
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::HandleInferiorState_Exited
void HandleInferiorState_Exited(NativeProcessProtocol *process)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1034
lldb_private::FileSpec
Definition: FileSpec.h:55
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::SendProcessOutput
void SendProcessOutput()
Definition: GDBRemoteCommunicationServerLLGS.cpp:1251
lldb-private-forward.h
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::SetSTDIOFileDescriptor
Status SetSTDIOFileDescriptor(int fd)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1206
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_vAttachWait
PacketResult Handle_vAttachWait(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3437
lldb_private::ProcessLaunchInfo
Definition: ProcessLaunchInfo.h:31
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qXfer
PacketResult Handle_qXfer(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3216
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::m_xfer_buffer_map
llvm::StringMap< std::unique_ptr< llvm::MemoryBuffer > > m_xfer_buffer_map
Definition: GDBRemoteCommunicationServerLLGS.h:113
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::ReadXferObject
llvm::Expected< std::unique_ptr< llvm::MemoryBuffer > > ReadXferObject(llvm::StringRef object, llvm::StringRef annex)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3162
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::MaybeCloseInferiorTerminalConnection
void MaybeCloseInferiorTerminalConnection()
Definition: GDBRemoteCommunicationServerLLGS.cpp:4056
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::m_next_saved_registers_id
uint32_t m_next_saved_registers_id
Definition: GDBRemoteCommunicationServerLLGS.h:116
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_jThreadsInfo
PacketResult Handle_jThreadsInfo(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3617
lldb_private::StreamString
Definition: StreamString.h:23
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_QListThreadsInStopReply
PacketResult Handle_QListThreadsInStopReply(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1519
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::m_continue_tid
lldb::tid_t m_continue_tid
Definition: GDBRemoteCommunicationServerLLGS.h:104
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::ClearProcessSpecificData
void ClearProcessSpecificData()
Definition: GDBRemoteCommunicationServerLLGS.cpp:4151
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::DebuggedProcess::Flag
Flag
Definition: GDBRemoteCommunicationServerLLGS.h:89
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle__M
PacketResult Handle__M(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:2559
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::AttachToProcess
Status AttachToProcess(lldb::pid_t pid)
Attach to a process.
Definition: GDBRemoteCommunicationServerLLGS.cpp:345
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::PrepareStopReplyPacketForThread
StreamString PrepareStopReplyPacketForThread(NativeThreadProtocol &thread)
Definition: GDBRemoteCommunicationServerLLGS.cpp:795
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_QSetWorkingDir
PacketResult Handle_QSetWorkingDir(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1489
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::m_debugged_processes
std::unordered_map< lldb::pid_t, DebuggedProcess > m_debugged_processes
Definition: GDBRemoteCommunicationServerLLGS.h:108
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_P
PacketResult Handle_P(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:2245
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::HandleNotificationAck
PacketResult HandleNotificationAck(std::deque< std::string > &queue)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3978
lldb_private::LLDBLog::LLVM_MARK_AS_BITMASK_ENUM
@ LLVM_MARK_AS_BITMASK_ENUM
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_QMemTags
PacketResult Handle_QMemTags(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3814
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
Communication.h
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::HandleFeatures
std::vector< std::string > HandleFeatures(const llvm::ArrayRef< llvm::StringRef > client_features) override
Definition: GDBRemoteCommunicationServerLLGS.cpp:4199
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_z
PacketResult Handle_z(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:2922
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::FindModuleFile
FileSpec FindModuleFile(const std::string &module_path, const ArchSpec &arch) override
Definition: GDBRemoteCommunicationServerLLGS.cpp:4159
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::LaunchProcess
Status LaunchProcess() override
Launch a process with the current launch settings.
Definition: GDBRemoteCommunicationServerLLGS.cpp:261
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::DataAvailableCallback
void DataAvailableCallback()
Definition: GDBRemoteCommunicationServerLLGS.cpp:1153
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::SendWResponse
PacketResult SendWResponse(NativeProcessProtocol *process)
Definition: GDBRemoteCommunicationServerLLGS.cpp:476
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_jLLDBTraceSupported
PacketResult Handle_jLLDBTraceSupported(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1283
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::m_stdio_notification_queue
std::deque< std::string > m_stdio_notification_queue
Definition: GDBRemoteCommunicationServerLLGS.h:121
NativeProcessProtocol.h
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_vAttachOrWait
PacketResult Handle_vAttachOrWait(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3476
lldb_private::MainLoopPosix
Definition: MainLoopPosix.h:27
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_jLLDBTraceGetBinaryData
PacketResult Handle_jLLDBTraceGetBinaryData(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1354
lldb_private::NativeProcessProtocol::Extension
Extension
Extension flag constants, returned by Factory::GetSupportedExtensions() and passed to SetEnabledExten...
Definition: NativeProcessProtocol.h:260
lldb_private::process_gdb_remote::LLGSArgToURL
std::string LLGSArgToURL(llvm::StringRef url_arg, bool reverse_connect)
Definition: GDBRemoteCommunicationServerLLGS.cpp:4279
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qsThreadInfo
PacketResult Handle_qsThreadInfo(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:2106
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::m_continue_process
NativeProcessProtocol * m_continue_process
Definition: GDBRemoteCommunicationServerLLGS.h:106
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::ProcessStateChanged
void ProcessStateChanged(NativeProcessProtocol *process, lldb::StateType state) override
Definition: GDBRemoteCommunicationServerLLGS.cpp:1093
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::SendContinueSuccessResponse
PacketResult SendContinueSuccessResponse()
Definition: GDBRemoteCommunicationServerLLGS.cpp:4263
lldb_private::Status
Definition: Status.h:44
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::SetEnabledExtensions
void SetEnabledExtensions(NativeProcessProtocol &process)
Definition: GDBRemoteCommunicationServerLLGS.cpp:4255
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::BuildTargetXml
llvm::Expected< std::unique_ptr< llvm::MemoryBuffer > > BuildTargetXml()
Definition: GDBRemoteCommunicationServerLLGS.cpp:3056
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_vCont_actions
PacketResult Handle_vCont_actions(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1672
uint32_t
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::XMLEncodeAttributeValue
static std::string XMLEncodeAttributeValue(llvm::StringRef value)
Definition: GDBRemoteCommunicationServerLLGS.cpp:4174
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_QThreadSuffixSupported
PacketResult Handle_QThreadSuffixSupported(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1512
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_vAttach
PacketResult Handle_vAttach(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3398
lldb::pid_t
uint64_t pid_t
Definition: lldb-types.h:85
lldb_private::NativeProcessProtocol
Definition: NativeProcessProtocol.h:48
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::m_extensions_supported
NativeProcessProtocol::Extension m_extensions_supported
Definition: GDBRemoteCommunicationServerLLGS.h:124
lldb_private::StreamGDBRemote
Definition: GDBRemote.h:25
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_vStdio
PacketResult Handle_vStdio(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3994
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qGetWorkingDir
PacketResult Handle_qGetWorkingDir(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1499
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::DebuggedProcess
Definition: GDBRemoteCommunicationServerLLGS.h:88
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_vKill
PacketResult Handle_vKill(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1453
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::DebuggedProcess::flags
Flag flags
Definition: GDBRemoteCommunicationServerLLGS.h:96
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::DidExec
void DidExec(NativeProcessProtocol *process) override
Definition: GDBRemoteCommunicationServerLLGS.cpp:1138
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::m_non_stop
bool m_non_stop
Definition: GDBRemoteCommunicationServerLLGS.h:119
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::DebuggedProcess::Flag::vkilled
@ vkilled
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::EnqueueStopReplyPackets
void EnqueueStopReplyPackets(lldb::tid_t thread_to_skip)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1020
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_vCont
PacketResult Handle_vCont(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1693
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::SetLaunchInfo
void SetLaunchInfo(const ProcessLaunchInfo &info)
Definition: GDBRemoteCommunicationServerLLGS.cpp:257
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_jLLDBTraceGetState
PacketResult Handle_jLLDBTraceGetState(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1336
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::GetThreadFromSuffix
NativeThreadProtocol * GetThreadFromSuffix(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:4081
lldb_private::ResumeActionList
Definition: Debug.h:33
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_jLLDBTraceStop
PacketResult Handle_jLLDBTraceStop(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1295
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::RegisterPacketHandlers
void RegisterPacketHandlers()
Definition: GDBRemoteCommunicationServerLLGS.cpp:79
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_I
PacketResult Handle_I(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:2417
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::GetCurrentThreadID
lldb::tid_t GetCurrentThreadID() const
Definition: GDBRemoteCommunicationServerLLGS.cpp:4133
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::SendONotification
PacketResult SendONotification(const char *buffer, uint32_t len)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1189
StringExtractorGDBRemote
Definition: StringExtractorGDBRemote.h:21
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qMemoryRegionInfo
PacketResult Handle_qMemoryRegionInfo(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:2748
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qProcessInfo
PacketResult Handle_qProcessInfo(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1379
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qMemTags
PacketResult Handle_qMemTags(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3733
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_memory_read
PacketResult Handle_memory_read(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:2478
LLDB_INVALID_THREAD_ID
#define LLDB_INVALID_THREAD_ID
Definition: lldb-defines.h:82
lldb::StateType
StateType
Process and Thread States.
Definition: lldb-enumerations.h:74
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::GDBRemoteCommunicationServerLLGS
GDBRemoteCommunicationServerLLGS(MainLoop &mainloop, const NativeProcessProtocol::Factory &process_factory)
Definition: GDBRemoteCommunicationServerLLGS.cpp:71
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::m_disabling_non_stop
bool m_disabling_non_stop
Definition: GDBRemoteCommunicationServerLLGS.h:120
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::AddProcessThreads
void AddProcessThreads(StreamGDBRemote &response, NativeProcessProtocol &process, bool &had_any)
Definition: GDBRemoteCommunicationServerLLGS.cpp:2070
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_H
PacketResult Handle_H(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:2325
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_QSaveRegisterState
PacketResult Handle_QSaveRegisterState(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3289
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_vCtrlC
PacketResult Handle_vCtrlC(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:4013
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::m_network_handle_up
MainLoop::ReadHandleUP m_network_handle_up
Definition: GDBRemoteCommunicationServerLLGS.h:101
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle__m
PacketResult Handle__m(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:2608
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qRegisterInfo
PacketResult Handle_qRegisterInfo(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1980
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qSaveCore
PacketResult Handle_qSaveCore(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3906
lldb_private::NativeProcessProtocol::Factory
Definition: NativeProcessProtocol.h:274
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::m_current_tid
lldb::tid_t m_current_tid
Definition: GDBRemoteCommunicationServerLLGS.h:103
MainLoop.h
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_c
PacketResult Handle_c(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1637
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::m_current_process
NativeProcessProtocol * m_current_process
Definition: GDBRemoteCommunicationServerLLGS.h:105
lldb::tid_t
uint64_t tid_t
Definition: lldb-types.h:86
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_k
PacketResult Handle_k(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1425
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::SendStopReplyPacketForThread
PacketResult SendStopReplyPacketForThread(NativeProcessProtocol &process, lldb::tid_t tid, bool force_synchronous)
Definition: GDBRemoteCommunicationServerLLGS.cpp:998
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::m_process_factory
const NativeProcessProtocol::Factory & m_process_factory
Definition: GDBRemoteCommunicationServerLLGS.h:102
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS
Definition: GDBRemoteCommunicationServerLLGS.h:31