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:3656
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::AppendThreadIDToResponse
void AppendThreadIDToResponse(Stream &response, lldb::pid_t pid, lldb::tid_t tid)
Definition: GDBRemoteCommunicationServerLLGS.cpp:4256
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_interrupt
PacketResult Handle_interrupt(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:2447
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::ResumeProcess
PacketResult ResumeProcess(NativeProcessProtocol &process, const ResumeActionList &actions)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1528
lldb_private::NativeProcessProtocol::NativeDelegate
Definition: NativeProcessProtocol.h:236
lldb_private::ArchSpec
Definition: ArchSpec.h:33
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qfThreadInfo
PacketResult Handle_qfThreadInfo(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:2083
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_Z
PacketResult Handle_Z(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:2823
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::InitializeDelegate
void InitializeDelegate(NativeProcessProtocol *process) override
Definition: GDBRemoteCommunicationServerLLGS.cpp:464
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_QRestoreRegisterState
PacketResult Handle_QRestoreRegisterState(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3321
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:1878
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_vRun
PacketResult Handle_vRun(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3493
GDBRemoteCommunicationServerCommon.h
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::GetNextSavedRegistersID
uint32_t GetNextSavedRegistersID()
Definition: GDBRemoteCommunicationServerLLGS.cpp:4132
lldb_private::process_gdb_remote::GDBRemoteCommunication::PacketResult
PacketResult
Definition: GDBRemoteCommunication.h:91
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:2164
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qMemoryRegionInfoSupported
PacketResult Handle_qMemoryRegionInfoSupported(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:2710
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_s
PacketResult Handle_s(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3004
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::SetContinueThreadID
void SetContinueThreadID(lldb::tid_t tid)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1870
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:1861
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:2109
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qWatchpointSupportInfo
PacketResult Handle_qWatchpointSupportInfo(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3631
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:395
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qVAttachOrWaitSupported
PacketResult Handle_qVAttachOrWaitSupported(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3454
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::SendStopReasonForState
PacketResult SendStopReasonForState(NativeProcessProtocol &process, lldb::StateType process_state, bool force_synchronous)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1921
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:1230
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::InitializeConnection
Status InitializeConnection(std::unique_ptr< Connection > connection)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1178
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:3685
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_M
PacketResult Handle_M(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:2631
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qThreadStopInfo
PacketResult Handle_qThreadStopInfo(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3581
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:1403
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::NewSubprocess
void NewSubprocess(NativeProcessProtocol *parent_process, std::unique_ptr< NativeProcessProtocol > child_process) override
Definition: GDBRemoteCommunicationServerLLGS.cpp:1144
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:3923
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_D
PacketResult Handle_D(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3529
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:1317
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_C
PacketResult Handle_C(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1552
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::HandleInferiorState_Stopped
void HandleInferiorState_Stopped(NativeProcessProtocol *process)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1078
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::StopSTDIOForwarding
void StopSTDIOForwarding()
Definition: GDBRemoteCommunicationServerLLGS.cpp:1249
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_QSetDisableASLR
PacketResult Handle_QSetDisableASLR(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1480
lldb_private::MainLoopBase::ReadHandleUP
std::unique_ptr< ReadHandle > ReadHandleUP
Definition: MainLoopBase.h:39
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_vStopped
PacketResult Handle_vStopped(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3986
lldb_private::Communication
Definition: Communication.h:84
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:4013
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::HandleInferiorState_Exited
void HandleInferiorState_Exited(NativeProcessProtocol *process)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1036
lldb_private::FileSpec
Definition: FileSpec.h:56
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::SendProcessOutput
void SendProcessOutput()
Definition: GDBRemoteCommunicationServerLLGS.cpp:1253
lldb-private-forward.h
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::SetSTDIOFileDescriptor
Status SetSTDIOFileDescriptor(int fd)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1208
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_vAttachWait
PacketResult Handle_vAttachWait(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3421
lldb_private::ProcessLaunchInfo
Definition: ProcessLaunchInfo.h:31
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qXfer
PacketResult Handle_qXfer(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3200
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:3146
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::MaybeCloseInferiorTerminalConnection
void MaybeCloseInferiorTerminalConnection()
Definition: GDBRemoteCommunicationServerLLGS.cpp:4042
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:3603
lldb_private::StreamString
Definition: StreamString.h:23
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_QListThreadsInStopReply
PacketResult Handle_QListThreadsInStopReply(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1521
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:4137
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:2554
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::AttachToProcess
Status AttachToProcess(lldb::pid_t pid)
Attach to a process.
Definition: GDBRemoteCommunicationServerLLGS.cpp:347
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::PrepareStopReplyPacketForThread
StreamString PrepareStopReplyPacketForThread(NativeThreadProtocol &thread)
Definition: GDBRemoteCommunicationServerLLGS.cpp:797
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_QSetWorkingDir
PacketResult Handle_QSetWorkingDir(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1491
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:2240
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::HandleNotificationAck
PacketResult HandleNotificationAck(std::deque< std::string > &queue)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3964
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:3800
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:4185
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_z
PacketResult Handle_z(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:2917
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::FindModuleFile
FileSpec FindModuleFile(const std::string &module_path, const ArchSpec &arch) override
Definition: GDBRemoteCommunicationServerLLGS.cpp:4145
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::LaunchProcess
Status LaunchProcess() override
Launch a process with the current launch settings.
Definition: GDBRemoteCommunicationServerLLGS.cpp:263
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::DataAvailableCallback
void DataAvailableCallback()
Definition: GDBRemoteCommunicationServerLLGS.cpp:1155
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::SendWResponse
PacketResult SendWResponse(NativeProcessProtocol *process)
Definition: GDBRemoteCommunicationServerLLGS.cpp:478
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_jLLDBTraceSupported
PacketResult Handle_jLLDBTraceSupported(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1285
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:3460
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_jLLDBTraceGetBinaryData
PacketResult Handle_jLLDBTraceGetBinaryData(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1356
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:4265
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qsThreadInfo
PacketResult Handle_qsThreadInfo(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:2101
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:1095
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::SendContinueSuccessResponse
PacketResult SendContinueSuccessResponse()
Definition: GDBRemoteCommunicationServerLLGS.cpp:4249
lldb_private::Status
Definition: Status.h:44
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::SetEnabledExtensions
void SetEnabledExtensions(NativeProcessProtocol &process)
Definition: GDBRemoteCommunicationServerLLGS.cpp:4241
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::BuildTargetXml
llvm::Expected< std::unique_ptr< llvm::MemoryBuffer > > BuildTargetXml()
Definition: GDBRemoteCommunicationServerLLGS.cpp:3051
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_vCont_actions
PacketResult Handle_vCont_actions(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1674
uint32_t
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::XMLEncodeAttributeValue
static std::string XMLEncodeAttributeValue(llvm::StringRef value)
Definition: GDBRemoteCommunicationServerLLGS.cpp:4160
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_QThreadSuffixSupported
PacketResult Handle_QThreadSuffixSupported(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1514
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_vAttach
PacketResult Handle_vAttach(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3382
lldb_private::MainLoop
Definition: MainLoop.h:39
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:27
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_vStdio
PacketResult Handle_vStdio(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3980
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qGetWorkingDir
PacketResult Handle_qGetWorkingDir(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1501
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:1455
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:1140
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:1022
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_vCont
PacketResult Handle_vCont(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1695
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::SetLaunchInfo
void SetLaunchInfo(const ProcessLaunchInfo &info)
Definition: GDBRemoteCommunicationServerLLGS.cpp:259
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_jLLDBTraceGetState
PacketResult Handle_jLLDBTraceGetState(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1338
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::GetThreadFromSuffix
NativeThreadProtocol * GetThreadFromSuffix(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:4067
lldb_private::ResumeActionList
Definition: Debug.h:33
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_jLLDBTraceStop
PacketResult Handle_jLLDBTraceStop(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1297
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::RegisterPacketHandlers
void RegisterPacketHandlers()
Definition: GDBRemoteCommunicationServerLLGS.cpp:81
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:2412
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::GetCurrentThreadID
lldb::tid_t GetCurrentThreadID() const
Definition: GDBRemoteCommunicationServerLLGS.cpp:4119
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::SendONotification
PacketResult SendONotification(const char *buffer, uint32_t len)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1191
StringExtractorGDBRemote
Definition: StringExtractorGDBRemote.h:21
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qMemoryRegionInfo
PacketResult Handle_qMemoryRegionInfo(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:2743
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qProcessInfo
PacketResult Handle_qProcessInfo(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1381
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qMemTags
PacketResult Handle_qMemTags(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3719
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_memory_read
PacketResult Handle_memory_read(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:2473
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:73
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:2065
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_H
PacketResult Handle_H(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:2320
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_QSaveRegisterState
PacketResult Handle_QSaveRegisterState(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3273
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_vCtrlC
PacketResult Handle_vCtrlC(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3999
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:2603
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qRegisterInfo
PacketResult Handle_qRegisterInfo(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1975
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::Handle_qSaveCore
PacketResult Handle_qSaveCore(StringExtractorGDBRemote &packet)
Definition: GDBRemoteCommunicationServerLLGS.cpp:3892
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:1639
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:1427
lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::SendStopReplyPacketForThread
PacketResult SendStopReplyPacketForThread(NativeProcessProtocol &process, lldb::tid_t tid, bool force_synchronous)
Definition: GDBRemoteCommunicationServerLLGS.cpp:1000
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