LLDB  mainline
ProcessGDBRemote.h
Go to the documentation of this file.
1 //===-- ProcessGDBRemote.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_PROCESSGDBREMOTE_H
10 #define LLDB_SOURCE_PLUGINS_PROCESS_GDB_REMOTE_PROCESSGDBREMOTE_H
11 
12 #include <atomic>
13 #include <map>
14 #include <mutex>
15 #include <string>
16 #include <vector>
17 
19 #include "lldb/Core/ModuleSpec.h"
21 #include "lldb/Host/HostThread.h"
23 #include "lldb/Target/Process.h"
24 #include "lldb/Target/Thread.h"
25 #include "lldb/Utility/ArchSpec.h"
28 #include "lldb/Utility/GDBRemote.h"
29 #include "lldb/Utility/Status.h"
35 
38 
39 #include "llvm/ADT/DenseMap.h"
40 
41 namespace lldb_private {
42 namespace repro {
43 class Loader;
44 }
45 namespace process_gdb_remote {
46 
47 class ThreadGDBRemote;
48 
49 class ProcessGDBRemote : public Process,
51 public:
52  ~ProcessGDBRemote() override;
53 
54  static lldb::ProcessSP CreateInstance(lldb::TargetSP target_sp,
55  lldb::ListenerSP listener_sp,
56  const FileSpec *crash_file_path,
57  bool can_connect);
58 
59  static void Initialize();
60 
61  static void DebuggerInitialize(Debugger &debugger);
62 
63  static void Terminate();
64 
65  static llvm::StringRef GetPluginNameStatic() { return "gdb-remote"; }
66 
67  static llvm::StringRef GetPluginDescriptionStatic();
68 
69  static std::chrono::seconds GetPacketTimeout();
70 
72 
73  // Check if a given Process
74  bool CanDebug(lldb::TargetSP target_sp,
75  bool plugin_specified_by_name) override;
76 
78 
79  // Creating a new process, or attaching to an existing one
80  Status DoWillLaunch(Module *module) override;
81 
82  Status DoLaunch(Module *exe_module, ProcessLaunchInfo &launch_info) override;
83 
84  void DidLaunch() override;
85 
87 
88  Status DoWillAttachToProcessWithName(const char *process_name,
89  bool wait_for_launch) override;
90 
91  Status DoConnectRemote(llvm::StringRef remote_url) override;
92 
94 
96  const ProcessAttachInfo &attach_info) override;
97 
98  Status
99  DoAttachToProcessWithName(const char *process_name,
100  const ProcessAttachInfo &attach_info) override;
101 
102  void DidAttach(ArchSpec &process_arch) override;
103 
104  // PluginInterface protocol
105  llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
106 
107  // Process Control
108  Status WillResume() override;
109 
110  Status DoResume() override;
111 
112  Status DoHalt(bool &caused_stop) override;
113 
114  Status DoDetach(bool keep_stopped) override;
115 
116  bool DetachRequiresHalt() override { return true; }
117 
118  Status DoSignal(int signal) override;
119 
120  Status DoDestroy() override;
121 
122  void RefreshStateAfterStop() override;
123 
124  void SetUnixSignals(const lldb::UnixSignalsSP &signals_sp);
125 
126  // Process Queries
127  bool IsAlive() override;
128 
130 
131  void WillPublicStop() override;
132 
133  // Process Memory
134  size_t DoReadMemory(lldb::addr_t addr, void *buf, size_t size,
135  Status &error) override;
136 
137  Status
138  WriteObjectFile(std::vector<ObjectFile::LoadableData> entries) override;
139 
140  size_t DoWriteMemory(lldb::addr_t addr, const void *buf, size_t size,
141  Status &error) override;
142 
143  lldb::addr_t DoAllocateMemory(size_t size, uint32_t permissions,
144  Status &error) override;
145 
146  Status DoDeallocateMemory(lldb::addr_t ptr) override;
147 
148  // Process STDIO
149  size_t PutSTDIN(const char *buf, size_t buf_size, Status &error) override;
150 
151  // Process Breakpoints
152  Status EnableBreakpointSite(BreakpointSite *bp_site) override;
153 
154  Status DisableBreakpointSite(BreakpointSite *bp_site) override;
155 
156  // Process Watchpoints
157  Status EnableWatchpoint(Watchpoint *wp, bool notify = true) override;
158 
159  Status DisableWatchpoint(Watchpoint *wp, bool notify = true) override;
160 
162 
163  llvm::Expected<TraceSupportedResponse> TraceSupported() override;
164 
165  llvm::Error TraceStop(const TraceStopRequest &request) override;
166 
167  llvm::Error TraceStart(const llvm::json::Value &request) override;
168 
169  llvm::Expected<std::string> TraceGetState(llvm::StringRef type) override;
170 
171  llvm::Expected<std::vector<uint8_t>>
172  TraceGetBinaryData(const TraceGetBinaryDataRequest &request) override;
173 
174  Status GetWatchpointSupportInfo(uint32_t &num, bool &after) override;
175 
176  bool StartNoticingNewThreads() override;
177 
178  bool StopNoticingNewThreads() override;
179 
181 
182  Status SendEventData(const char *data) override;
183 
184  // Override DidExit so we can disconnect from the remote GDB server
185  void DidExit() override;
186 
187  void SetUserSpecifiedMaxMemoryTransferSize(uint64_t user_specified_max);
188 
189  bool GetModuleSpec(const FileSpec &module_file_spec, const ArchSpec &arch,
190  ModuleSpec &module_spec) override;
191 
192  void PrefetchModuleSpecs(llvm::ArrayRef<FileSpec> module_file_specs,
193  const llvm::Triple &triple) override;
194 
195  llvm::VersionTuple GetHostOSVersion() override;
196  llvm::VersionTuple GetHostMacCatalystVersion() override;
197 
198  llvm::Error LoadModules() override;
199 
200  llvm::Expected<LoadedModuleInfoList> GetLoadedModuleList() override;
201 
202  Status GetFileLoadAddress(const FileSpec &file, bool &is_loaded,
203  lldb::addr_t &load_addr) override;
204 
205  void ModulesDidLoad(ModuleList &module_list) override;
206 
208  GetLoadedDynamicLibrariesInfos(lldb::addr_t image_list_address,
209  lldb::addr_t image_count) override;
210 
211  Status
213  const StructuredData::ObjectSP &config_sp) override;
214 
216 
218  const std::vector<lldb::addr_t> &load_addresses) override;
219 
222 
224 
226  StringExtractorGDBRemote &inputStringExtractor);
227 
228  void DidFork(lldb::pid_t child_pid, lldb::tid_t child_tid) override;
229  void DidVFork(lldb::pid_t child_pid, lldb::tid_t child_tid) override;
230  void DidVForkDone() override;
231  void DidExec() override;
232 
233  llvm::Expected<bool> SaveCore(llvm::StringRef outfile) override;
234 
235 protected:
236  friend class ThreadGDBRemote;
239 
240  ProcessGDBRemote(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp);
241 
242  bool SupportsMemoryTagging() override;
243 
244  /// Broadcaster event bits definitions.
245  enum {
249  };
250 
252  std::atomic<lldb::pid_t> m_debugserver_pid;
253 
254  llvm::Optional<StringExtractorGDBRemote> m_last_stop_packet;
255  std::recursive_mutex m_last_stop_packet_mutex;
256 
259  lldb::ListenerSP m_async_listener_sp;
261  std::recursive_mutex m_async_thread_state_mutex;
262  typedef std::vector<lldb::tid_t> tid_collection;
263  typedef std::vector<std::pair<lldb::tid_t, int>> tid_sig_collection;
264  typedef std::map<lldb::addr_t, lldb::addr_t> MMapMap;
265  typedef std::map<uint32_t, std::string> ExpeditedRegisterMap;
266  tid_collection m_thread_ids; // Thread IDs for all threads. This list gets
267  // updated after stopping
268  std::vector<lldb::addr_t> m_thread_pcs; // PC values for all the threads.
269  StructuredData::ObjectSP m_jstopinfo_sp; // Stop info only for any threads
270  // that have valid stop infos
271  StructuredData::ObjectSP m_jthreadsinfo_sp; // Full stop info, expedited
272  // registers and memory for all
273  // threads if "jThreadsInfo"
274  // packet is supported
275  tid_collection m_continue_c_tids; // 'c' for continue
276  tid_sig_collection m_continue_C_tids; // 'C' for continue with signal
278  tid_sig_collection m_continue_S_tids; // 'S' for step with signal
279  uint64_t m_max_memory_size; // The maximum number of bytes to read/write when
280  // reading and writing memory
281  uint64_t m_remote_stub_max_memory_size; // The maximum memory size the remote
282  // gdb stub can handle
284  lldb::BreakpointSP m_thread_create_bp_sp;
286  lldb::CommandObjectSP m_command_sp;
288  lldb::tid_t m_initial_tid; // The initial thread ID, given by stub on attach
290 
295 
297 
298  // Accessors
300  return state == lldb::eStateRunning || IsStepping(state);
301  }
302 
304  return state == lldb::eStateStepping;
305  }
306 
307  bool CanResume(lldb::StateType state) { return state == lldb::eStateStopped; }
308 
309  bool HasExited(lldb::StateType state) { return state == lldb::eStateExited; }
310 
311  void Clear();
312 
313  bool DoUpdateThreadList(ThreadList &old_thread_list,
314  ThreadList &new_thread_list) override;
315 
316  Status EstablishConnectionIfNeeded(const ProcessInfo &process_info);
317 
318  Status LaunchAndConnectToDebugserver(const ProcessInfo &process_info);
319 
320  void KillDebugserverProcess();
321 
322  void BuildDynamicRegisterInfo(bool force);
323 
324  void SetLastStopPacket(const StringExtractorGDBRemote &response);
325 
326  bool ParsePythonTargetDefinition(const FileSpec &target_definition_fspec);
327 
328  DataExtractor GetAuxvData() override;
329 
331 
332  void GetMaxMemorySize();
333 
335 
336  size_t UpdateThreadPCsFromStopReplyThreadsValue(llvm::StringRef value);
337 
338  size_t UpdateThreadIDsFromStopReplyThreadsValue(llvm::StringRef value);
339 
340  bool StartAsyncThread();
341 
342  void StopAsyncThread();
343 
345 
346  static void
347  MonitorDebugserverProcess(std::weak_ptr<ProcessGDBRemote> process_wp,
348  lldb::pid_t pid, int signo, int exit_status);
349 
351 
352  bool
354  const StructuredData::ObjectSP &thread_infos_sp);
355 
356  lldb::ThreadSP SetThreadStopInfo(StructuredData::Dictionary *thread_dict);
357 
358  lldb::ThreadSP
360  ExpeditedRegisterMap &expedited_register_map, uint8_t signo,
361  const std::string &thread_name, const std::string &reason,
362  const std::string &description, uint32_t exc_type,
363  const std::vector<lldb::addr_t> &exc_data,
364  lldb::addr_t thread_dispatch_qaddr, bool queue_vars_valid,
365  lldb_private::LazyBool associated_with_libdispatch_queue,
366  lldb::addr_t dispatch_queue_t, std::string &queue_name,
367  lldb::QueueKind queue_kind, uint64_t queue_serial);
368 
369  void ClearThreadIDList();
370 
371  bool UpdateThreadIDList();
372 
373  void DidLaunchOrAttach(ArchSpec &process_arch);
375 
376  Status ConnectToDebugserver(llvm::StringRef host_port);
377 
378  const char *GetDispatchQueueNameForThread(lldb::addr_t thread_dispatch_qaddr,
379  std::string &dispatch_queue_name);
380 
381  DynamicLoader *GetDynamicLoader() override;
382 
384  ArchSpec &arch_to_use, std::string xml_filename,
385  std::vector<DynamicRegisterInfo::Register> &registers);
386 
387  // Convert DynamicRegisterInfo::Registers into RegisterInfos and add
388  // to the dynamic register list.
389  void AddRemoteRegisters(std::vector<DynamicRegisterInfo::Register> &registers,
390  const ArchSpec &arch_to_use);
391  // Query remote GDBServer for register information
393 
394  lldb::ModuleSP LoadModuleAtAddress(const FileSpec &file,
395  lldb::addr_t link_map,
396  lldb::addr_t base_addr,
397  bool value_is_offset);
398 
400 
401  Status FlashErase(lldb::addr_t addr, size_t size);
402 
403  Status FlashDone();
404 
405  bool HasErased(FlashRange range);
406 
407  llvm::Expected<std::vector<uint8_t>>
408  DoReadMemoryTags(lldb::addr_t addr, size_t len, int32_t type) override;
409 
410  Status DoWriteMemoryTags(lldb::addr_t addr, size_t len, int32_t type,
411  const std::vector<uint8_t> &tags) override;
412 
414  MemoryRegionInfo &region_info) override;
415 
416 private:
417  // For ProcessGDBRemote only
419  std::map<uint64_t, uint32_t> m_thread_id_to_used_usec_map;
421 
422  static bool NewThreadNotifyBreakpointHit(void *baton,
423  StoppointCallbackContext *context,
424  lldb::user_id_t break_id,
425  lldb::user_id_t break_loc_id);
426 
427  // ContinueDelegate interface
428  void HandleAsyncStdout(llvm::StringRef out) override;
429  void HandleAsyncMisc(llvm::StringRef data) override;
430  void HandleStopReply() override;
431  void HandleAsyncStructuredDataPacket(llvm::StringRef data) override;
432 
433  void SetThreadPc(const lldb::ThreadSP &thread_sp, uint64_t index);
434  using ModuleCacheKey = std::pair<std::string, std::string>;
435  // KeyInfo for the cached module spec DenseMap.
436  // The invariant is that all real keys will have the file and architecture
437  // set.
438  // The empty key has an empty file and an empty arch.
439  // The tombstone key has an invalid arch and an empty file.
440  // The comparison and hash functions take the file name and architecture
441  // triple into account.
444 
445  static ModuleCacheKey getTombstoneKey() { return ModuleCacheKey("", "T"); }
446 
447  static unsigned getHashValue(const ModuleCacheKey &key) {
448  return llvm::hash_combine(key.first, key.second);
449  }
450 
451  static bool isEqual(const ModuleCacheKey &LHS, const ModuleCacheKey &RHS) {
452  return LHS == RHS;
453  }
454  };
455 
456  llvm::DenseMap<ModuleCacheKey, ModuleSpec, ModuleCacheInfo>
458 
459  ProcessGDBRemote(const ProcessGDBRemote &) = delete;
460  const ProcessGDBRemote &operator=(const ProcessGDBRemote &) = delete;
461 
462  // fork helpers
463  void DidForkSwitchSoftwareBreakpoints(bool enable);
464  void DidForkSwitchHardwareTraps(bool enable);
465 };
466 
467 } // namespace process_gdb_remote
468 } // namespace lldb_private
469 
470 #endif // LLDB_SOURCE_PLUGINS_PROCESS_GDB_REMOTE_PROCESSGDBREMOTE_H
lldb_private::process_gdb_remote::ProcessGDBRemote::eBroadcastBitAsyncContinue
@ eBroadcastBitAsyncContinue
Definition: ProcessGDBRemote.h:246
lldb_private::process_gdb_remote::ProcessGDBRemote::TraceStop
llvm::Error TraceStop(const TraceStopRequest &request) override
Stop tracing a live process or its threads.
Definition: ProcessGDBRemote.cpp:1130
lldb_private::process_gdb_remote::GDBRemoteRegisterContext
Definition: GDBRemoteRegisterContext.h:44
lldb_private::process_gdb_remote::ProcessGDBRemote::m_last_stop_packet
llvm::Optional< StringExtractorGDBRemote > m_last_stop_packet
Definition: ProcessGDBRemote.h:254
lldb_private::process_gdb_remote::ProcessGDBRemote::MonitorDebugserverProcess
static void MonitorDebugserverProcess(std::weak_ptr< ProcessGDBRemote > process_wp, lldb::pid_t pid, int signo, int exit_status)
Definition: ProcessGDBRemote.cpp:3292
lldb_private::process_gdb_remote::ProcessGDBRemote::m_thread_ids
tid_collection m_thread_ids
Definition: ProcessGDBRemote.h:266
lldb_private::process_gdb_remote::ProcessGDBRemote::HarmonizeThreadIdsForProfileData
std::string HarmonizeThreadIdsForProfileData(StringExtractorGDBRemote &inputStringExtractor)
Definition: ProcessGDBRemote.cpp:4661
lldb_private::process_gdb_remote::ProcessGDBRemote::MaybeLoadExecutableModule
void MaybeLoadExecutableModule()
Definition: ProcessGDBRemote.cpp:1030
lldb_private::process_gdb_remote::ProcessGDBRemote::DoResume
Status DoResume() override
Resumes all of a process's threads as configured using the Thread run control functions.
Definition: ProcessGDBRemote.cpp:1169
lldb_private::process_gdb_remote::ProcessGDBRemote::BuildDynamicRegisterInfo
void BuildDynamicRegisterInfo(bool force)
Definition: ProcessGDBRemote.cpp:368
lldb_private::process_gdb_remote::ProcessGDBRemote::MMapMap
std::map< lldb::addr_t, lldb::addr_t > MMapMap
Definition: ProcessGDBRemote.h:264
lldb_private::process_gdb_remote::ProcessGDBRemote::m_async_broadcaster
Broadcaster m_async_broadcaster
Definition: ProcessGDBRemote.h:258
lldb_private::process_gdb_remote::ProcessGDBRemote::DoSignal
Status DoSignal(int signal) override
Sends a process a UNIX signal signal.
Definition: ProcessGDBRemote.cpp:3151
lldb_private::StructuredData::Dictionary
Definition: StructuredData.h:368
lldb_private::process_gdb_remote::ProcessGDBRemote::ModuleCacheInfo::getEmptyKey
static ModuleCacheKey getEmptyKey()
Definition: ProcessGDBRemote.h:443
lldb_private::ArchSpec
Definition: ArchSpec.h:32
lldb_private::process_gdb_remote::ProcessGDBRemote::DidLaunch
void DidLaunch() override
Called after launching a process.
Definition: ProcessGDBRemote.cpp:1055
lldb_private::process_gdb_remote::ProcessGDBRemote::m_gdb_comm
GDBRemoteCommunicationClient m_gdb_comm
Definition: ProcessGDBRemote.h:251
lldb_private::process_gdb_remote::ProcessGDBRemote::WillLaunchOrAttach
Status WillLaunchOrAttach()
Definition: ProcessGDBRemote.cpp:653
lldb_private::process_gdb_remote::ProcessGDBRemote::DoWillAttachToProcessWithName
Status DoWillAttachToProcessWithName(const char *process_name, bool wait_for_launch) override
Called before attaching to a process.
Definition: ProcessGDBRemote.cpp:515
lldb_private::process_gdb_remote::ProcessGDBRemote::GetFileLoadAddress
Status GetFileLoadAddress(const FileSpec &file, bool &is_loaded, lldb::addr_t &load_addr) override
Try to find the load address of a file.
Definition: ProcessGDBRemote.cpp:4578
lldb_private::StoppointCallbackContext
General Outline: When we hit a breakpoint we need to package up whatever information is needed to eva...
Definition: StoppointCallbackContext.h:26
lldb_private::process_gdb_remote::ProcessGDBRemote::m_thread_id_to_used_usec_map
std::map< uint64_t, uint32_t > m_thread_id_to_used_usec_map
Definition: ProcessGDBRemote.h:419
lldb_private::process_gdb_remote::ProcessGDBRemote::DidForkSwitchHardwareTraps
void DidForkSwitchHardwareTraps(bool enable)
Definition: ProcessGDBRemote.cpp:5149
lldb_private::process_gdb_remote::ProcessGDBRemote::m_vfork_in_progress
bool m_vfork_in_progress
Definition: ProcessGDBRemote.h:296
lldb_private::process_gdb_remote::ProcessGDBRemote::DoAttachToProcessWithID
Status DoAttachToProcessWithID(lldb::pid_t pid, const ProcessAttachInfo &attach_info) override
Attach to an existing process using a process ID.
Definition: ProcessGDBRemote.cpp:1060
lldb_private::process_gdb_remote::ProcessGDBRemote::DidFork
void DidFork(lldb::pid_t child_pid, lldb::tid_t child_tid) override
Called after a reported fork.
Definition: ProcessGDBRemote.cpp:5174
lldb_private::process_gdb_remote::ProcessGDBRemote::HandleStopReply
void HandleStopReply() override
Definition: ProcessGDBRemote.cpp:4737
lldb_private::TraceGetBinaryDataRequest
jLLDBTraceGetBinaryData gdb-remote packet
Definition: TraceGDBRemotePackets.h:149
lldb_private::process_gdb_remote::ProcessGDBRemote::DisableWatchpoint
Status DisableWatchpoint(Watchpoint *wp, bool notify=true) override
Definition: ProcessGDBRemote.cpp:3100
ModuleSpec.h
lldb_private::process_gdb_remote::ProcessGDBRemote::SendEventData
Status SendEventData(const char *data) override
Definition: ProcessGDBRemote.cpp:3690
lldb_private::process_gdb_remote::ProcessGDBRemote::WillPublicStop
void WillPublicStop() override
Called when the process is about to broadcast a public stop.
Definition: ProcessGDBRemote.cpp:2446
lldb_private::HostThread
Definition: HostThread.h:29
lldb_private::process_gdb_remote::ProcessGDBRemote::GetGDBRemote
GDBRemoteCommunicationClient & GetGDBRemote()
Definition: ProcessGDBRemote.h:180
lldb_private::process_gdb_remote::GDBRemoteCommunicationClient
Definition: GDBRemoteCommunicationClient.h:59
StructuredData.h
lldb_private::process_gdb_remote::ProcessGDBRemote::LoadModuleAtAddress
lldb::ModuleSP LoadModuleAtAddress(const FileSpec &file, lldb::addr_t link_map, lldb::addr_t base_addr, bool value_is_offset)
Definition: ProcessGDBRemote.cpp:4485
lldb_private::process_gdb_remote::ProcessGDBRemote::FlashDone
Status FlashDone()
Definition: ProcessGDBRemote.cpp:2673
lldb_private::process_gdb_remote::ProcessGDBRemote::ModuleCacheInfo
Definition: ProcessGDBRemote.h:442
lldb_private::process_gdb_remote::ProcessGDBRemote::IsRunning
bool IsRunning(lldb::StateType state)
Definition: ProcessGDBRemote.h:299
lldb_private::process_gdb_remote::ProcessGDBRemote::Clear
void Clear()
Definition: ProcessGDBRemote.cpp:3146
lldb_private::process_gdb_remote::ProcessGDBRemote::tid_sig_collection
std::vector< std::pair< lldb::tid_t, int > > tid_sig_collection
Definition: ProcessGDBRemote.h:263
lldb_private::process_gdb_remote::ProcessGDBRemote::FlashErase
Status FlashErase(lldb::addr_t addr, size_t size)
Definition: ProcessGDBRemote.cpp:2593
lldb_private::process_gdb_remote::ProcessGDBRemote::operator=
const ProcessGDBRemote & operator=(const ProcessGDBRemote &)=delete
lldb_private::process_gdb_remote::ProcessGDBRemote::NewThreadNotifyBreakpointHit
static bool NewThreadNotifyBreakpointHit(void *baton, StoppointCallbackContext *context, lldb::user_id_t break_id, lldb::user_id_t break_loc_id)
Definition: ProcessGDBRemote.cpp:3599
lldb_private::process_gdb_remote::ProcessGDBRemote::DidLaunchOrAttach
void DidLaunchOrAttach(ArchSpec &process_arch)
Definition: ProcessGDBRemote.cpp:925
lldb_private::process_gdb_remote::ProcessGDBRemote::ClearThreadIDList
void ClearThreadIDList()
Definition: ProcessGDBRemote.cpp:1385
lldb_private::process_gdb_remote::ProcessGDBRemote::HandleAsyncStructuredDataPacket
void HandleAsyncStructuredDataPacket(llvm::StringRef data) override
Process asynchronously-received structured data.
Definition: ProcessGDBRemote.cpp:4841
lldb_private::Process
Definition: Process.h:338
lldb_private::process_gdb_remote::ProcessGDBRemote::DoDetach
Status DoDetach(bool keep_stopped) override
Detaches from a running or stopped process.
Definition: ProcessGDBRemote.cpp:2317
lldb_private::process_gdb_remote::ProcessGDBRemote::EnableBreakpointSite
Status EnableBreakpointSite(BreakpointSite *bp_site) override
Definition: ProcessGDBRemote.cpp:2875
lldb_private::process_gdb_remote::ProcessGDBRemote::CalculateThreadStopInfo
bool CalculateThreadStopInfo(ThreadGDBRemote *thread)
Definition: ProcessGDBRemote.cpp:1575
DynamicRegisterInfo.h
lldb_private::process_gdb_remote::GDBRemoteDynamicRegisterInfoSP
std::shared_ptr< GDBRemoteDynamicRegisterInfo > GDBRemoteDynamicRegisterInfoSP
Definition: GDBRemoteRegisterContext.h:30
lldb_private::process_gdb_remote::ProcessGDBRemote::DidForkSwitchSoftwareBreakpoints
void DidForkSwitchSoftwareBreakpoints(bool enable)
Definition: ProcessGDBRemote.cpp:5137
lldb_private::process_gdb_remote::ProcessGDBRemote::UpdateThreadPCsFromStopReplyThreadsValue
size_t UpdateThreadPCsFromStopReplyThreadsValue(llvm::StringRef value)
Definition: ProcessGDBRemote.cpp:1410
lldb_private::process_gdb_remote::ProcessGDBRemote::GetPluginName
llvm::StringRef GetPluginName() override
Definition: ProcessGDBRemote.h:105
lldb_private::Module
Definition: Module.h:86
lldb_private::MemoryRegionInfo
Definition: MemoryRegionInfo.h:21
lldb_private::process_gdb_remote::ProcessGDBRemote::ConfigureStructuredData
Status ConfigureStructuredData(ConstString type_name, const StructuredData::ObjectSP &config_sp) override
Configure asynchronous structured data feature.
Definition: ProcessGDBRemote.cpp:3865
lldb_private::process_gdb_remote::ProcessGDBRemote::GetGDBServerRegisterInfo
bool GetGDBServerRegisterInfo(ArchSpec &arch)
Definition: ProcessGDBRemote.cpp:4303
lldb_private::process_gdb_remote::ProcessGDBRemote::GetLoadedModuleList
llvm::Expected< LoadedModuleInfoList > GetLoadedModuleList() override
Query remote GDBServer for a detailed loaded library list.
Definition: ProcessGDBRemote.cpp:4320
lldb_private::process_gdb_remote::GDBRemoteClientBase::ContinueDelegate
Definition: GDBRemoteClientBase.h:25
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
lldb_private::process_gdb_remote::ProcessGDBRemote::GetPluginDescriptionStatic
static llvm::StringRef GetPluginDescriptionStatic()
Definition: ProcessGDBRemote.cpp:188
lldb_private::LazyBool
LazyBool
Definition: lldb-private-enumerations.h:115
lldb_private::process_gdb_remote::ProcessGDBRemote::DidExit
void DidExit() override
Definition: ProcessGDBRemote.cpp:1148
StringExtractor
Definition: StringExtractor.h:19
lldb_private::process_gdb_remote::ProcessGDBRemote::Terminate
static void Terminate()
Definition: ProcessGDBRemote.cpp:192
lldb_private::process_gdb_remote::ProcessGDBRemote::DebuggerInitialize
static void DebuggerInitialize(Debugger &debugger)
Definition: ProcessGDBRemote.cpp:3364
lldb_private::process_gdb_remote::ProcessGDBRemote::WriteObjectFile
Status WriteObjectFile(std::vector< ObjectFile::LoadableData > entries) override
Definition: ProcessGDBRemote.cpp:2561
lldb_private::process_gdb_remote::ProcessGDBRemote::SetThreadStopInfo
lldb::StateType SetThreadStopInfo(StringExtractor &stop_packet)
Definition: ProcessGDBRemote.cpp:2043
lldb_private::process_gdb_remote::ProcessGDBRemote::PutSTDIN
size_t PutSTDIN(const char *buf, size_t buf_size, Status &error) override
Puts data into this process's STDIN.
Definition: ProcessGDBRemote.cpp:2864
lldb_private::process_gdb_remote::ProcessGDBRemote::m_max_memory_size
uint64_t m_max_memory_size
Definition: ProcessGDBRemote.h:279
lldb_private::process_gdb_remote::ProcessGDBRemote::AsyncThread
lldb::thread_result_t AsyncThread()
Definition: ProcessGDBRemote.cpp:3426
lldb_private::process_gdb_remote::ProcessGDBRemote::m_erased_flash_ranges
FlashRangeVector m_erased_flash_ranges
Definition: ProcessGDBRemote.h:294
lldb::eStateExited
@ eStateExited
Process has exited and can't be examined.
Definition: lldb-enumerations.h:91
Process.h
lldb_private::process_gdb_remote::ProcessGDBRemote::GetImageInfoAddress
lldb::addr_t GetImageInfoAddress() override
Get the image information address for the current process.
Definition: ProcessGDBRemote.cpp:2428
lldb_private::process_gdb_remote::ProcessGDBRemote::DoDeallocateMemory
Status DoDeallocateMemory(lldb::addr_t ptr) override
Actually deallocate memory in the process.
Definition: ProcessGDBRemote.cpp:2828
lldb_private::process_gdb_remote::ProcessGDBRemote::UpdateAutomaticSignalFiltering
Status UpdateAutomaticSignalFiltering() override
Definition: ProcessGDBRemote.cpp:3610
Broadcaster.h
lldb_private::process_gdb_remote::ThreadGDBRemote
Definition: ThreadGDBRemote.h:28
lldb::eStateStopped
@ eStateStopped
Process or thread is stopped and can be examined.
Definition: lldb-enumerations.h:85
lldb_private::process_gdb_remote::ProcessGDBRemote::CanDebug
bool CanDebug(lldb::TargetSP target_sp, bool plugin_specified_by_name) override
Check if a plug-in instance can debug the file in module.
Definition: ProcessGDBRemote.cpp:214
lldb_private::process_gdb_remote::ProcessGDBRemote::EstablishConnectionIfNeeded
Status EstablishConnectionIfNeeded(const ProcessInfo &process_info)
Definition: ProcessGDBRemote.cpp:3162
lldb_private::process_gdb_remote::ProcessGDBRemote::m_breakpoint_pc_offset
int64_t m_breakpoint_pc_offset
Definition: ProcessGDBRemote.h:287
lldb_private::FileSpec
Definition: FileSpec.h:55
lldb_private::process_gdb_remote::ProcessGDBRemote::DoAttachToProcessWithName
Status DoAttachToProcessWithName(const char *process_name, const ProcessAttachInfo &attach_info) override
Attach to an existing process using a partial process name.
Definition: ProcessGDBRemote.cpp:1087
error
static llvm::raw_ostream & error(Stream &strm)
Definition: CommandReturnObject.cpp:17
lldb_private::process_gdb_remote::ProcessGDBRemote::DoLaunch
Status DoLaunch(Module *exe_module, ProcessLaunchInfo &launch_info) override
Launch a new process.
Definition: ProcessGDBRemote.cpp:660
lldb_private::process_gdb_remote::ProcessGDBRemote::HasExited
bool HasExited(lldb::StateType state)
Definition: ProcessGDBRemote.h:309
HostThread.h
lldb-private-forward.h
lldb_private::BreakpointSite
Definition: BreakpointSite.h:35
ThreadSafeValue.h
lldb_private::process_gdb_remote::ProcessGDBRemote::SetThreadPc
void SetThreadPc(const lldb::ThreadSP &thread_sp, uint64_t index)
Definition: ProcessGDBRemote.cpp:1534
lldb_private::ProcessLaunchInfo
Definition: ProcessLaunchInfo.h:31
lldb_private::DataExtractor
Definition: DataExtractor.h:48
lldb_private::ModuleList
Definition: ModuleList.h:82
lldb_private::process_gdb_remote::ProcessGDBRemote::SaveCore
llvm::Expected< bool > SaveCore(llvm::StringRef outfile) override
Save core dump into the specified file.
Definition: ProcessGDBRemote.cpp:4749
lldb_private::process_gdb_remote::ProcessGDBRemote::FlashRange
FlashRangeVector::Entry FlashRange
Definition: ProcessGDBRemote.h:293
lldb_private::ProcessInfo
Definition: ProcessInfo.h:29
lldb_private::process_gdb_remote::ProcessGDBRemote::TraceGetState
llvm::Expected< std::string > TraceGetState(llvm::StringRef type) override
Get the current tracing state of the process and its threads.
Definition: ProcessGDBRemote.cpp:1139
lldb_private::process_gdb_remote::ProcessGDBRemote::IsStepping
bool IsStepping(lldb::StateType state)
Definition: ProcessGDBRemote.h:303
lldb_private::process_gdb_remote::ProcessGDBRemote::AddRemoteRegisters
void AddRemoteRegisters(std::vector< DynamicRegisterInfo::Register > &registers, const ArchSpec &arch_to_use)
Definition: ProcessGDBRemote.cpp:4261
lldb_private::Watchpoint
Definition: Watchpoint.h:24
lldb_private::process_gdb_remote::ProcessGDBRemote::GetWatchpointSupportInfo
Status GetWatchpointSupportInfo(uint32_t &num) override
Definition: ProcessGDBRemote.cpp:2816
lldb_private::process_gdb_remote::ProcessGDBRemote::DoReadMemoryTags
llvm::Expected< std::vector< uint8_t > > DoReadMemoryTags(lldb::addr_t addr, size_t len, int32_t type) override
Does the final operation to read memory tags.
Definition: ProcessGDBRemote.cpp:2535
lldb_private::process_gdb_remote::ProcessGDBRemote::ConnectToDebugserver
Status ConnectToDebugserver(llvm::StringRef host_port)
Definition: ProcessGDBRemote.cpp:851
lldb_private::process_gdb_remote::ProcessGDBRemote::SetUserSpecifiedMaxMemoryTransferSize
void SetUserSpecifiedMaxMemoryTransferSize(uint64_t user_specified_max)
Definition: ProcessGDBRemote.cpp:3916
lldb_private::StructuredData::ObjectSP
std::shared_ptr< Object > ObjectSP
Definition: StructuredData.h:59
lldb_private::process_gdb_remote::ProcessGDBRemote::StartNoticingNewThreads
bool StartNoticingNewThreads() override
Call this to set the lldb in the mode where it breaks on new thread creations, and then auto-restarts...
Definition: ProcessGDBRemote.cpp:3647
StreamString.h
lldb_private::process_gdb_remote::ProcessGDBRemote::DetachRequiresHalt
bool DetachRequiresHalt() override
Definition: ProcessGDBRemote.h:116
lldb_private::process_gdb_remote::ProcessGDBRemote::StopAsyncThread
void StopAsyncThread()
Definition: ProcessGDBRemote.cpp:3404
lldb_private::process_gdb_remote::ProcessGDBRemote::WillResume
Status WillResume() override
Called before resuming to a process.
Definition: ProcessGDBRemote.cpp:1159
lldb_private::process_gdb_remote::ProcessGDBRemote::GetLoadedDynamicLibrariesInfos_sender
StructuredData::ObjectSP GetLoadedDynamicLibrariesInfos_sender(StructuredData::ObjectSP args)
Definition: ProcessGDBRemote.cpp:3795
lldb_private::process_gdb_remote::ProcessGDBRemote::~ProcessGDBRemote
~ProcessGDBRemote() override
Definition: ProcessGDBRemote.cpp:292
lldb_private::process_gdb_remote::ProcessGDBRemote::GetHostOSVersion
llvm::VersionTuple GetHostOSVersion() override
Sometimes the connection to a process can detect the host OS version that the process is running on.
Definition: ProcessGDBRemote.cpp:3982
lldb_private::ThreadList
Definition: ThreadList.h:26
lldb_private::process_gdb_remote::ProcessGDBRemote::m_remote_stub_max_memory_size
uint64_t m_remote_stub_max_memory_size
Definition: ProcessGDBRemote.h:281
lldb_private::ConstString
Definition: ConstString.h:39
GDBRemoteRegisterContext.h
lldb_private::process_gdb_remote::ProcessGDBRemote::HasErased
bool HasErased(FlashRange range)
Definition: ProcessGDBRemote.cpp:2585
lldb_private::process_gdb_remote::ProcessGDBRemote::ParsePythonTargetDefinition
bool ParsePythonTargetDefinition(const FileSpec &target_definition_fspec)
Definition: ProcessGDBRemote.cpp:309
lldb_private::process_gdb_remote::ProcessGDBRemote::ExpeditedRegisterMap
std::map< uint32_t, std::string > ExpeditedRegisterMap
Definition: ProcessGDBRemote.h:265
lldb_private::process_gdb_remote::ProcessGDBRemote::GetThreadStopInfoFromJSON
bool GetThreadStopInfoFromJSON(ThreadGDBRemote *thread, const StructuredData::ObjectSP &thread_infos_sp)
Definition: ProcessGDBRemote.cpp:1550
lldb_private::process_gdb_remote::ProcessGDBRemote::StartAsyncThread
bool StartAsyncThread()
Definition: ProcessGDBRemote.cpp:3375
lldb_private::process_gdb_remote::ProcessGDBRemote::DidVForkDone
void DidVForkDone() override
Called after reported vfork completion.
Definition: ProcessGDBRemote.cpp:5296
GDBRemote.h
lldb_private::process_gdb_remote::ProcessGDBRemote::ModuleCacheKey
std::pair< std::string, std::string > ModuleCacheKey
Definition: ProcessGDBRemote.h:434
lldb_private::process_gdb_remote::ProcessGDBRemote::m_debugserver_pid
std::atomic< lldb::pid_t > m_debugserver_pid
Definition: ProcessGDBRemote.h:252
lldb_private::process_gdb_remote::ProcessGDBRemote::m_jthreadsinfo_sp
StructuredData::ObjectSP m_jthreadsinfo_sp
Definition: ProcessGDBRemote.h:271
lldb_private::process_gdb_remote::ProcessGDBRemote::m_async_thread
HostThread m_async_thread
Definition: ProcessGDBRemote.h:260
lldb_private::Range
Definition: Process.h:61
lldb_private::process_gdb_remote::ProcessGDBRemote::ProcessGDBRemote
ProcessGDBRemote(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp)
lldb_private::DynamicLoader
Definition: DynamicLoader.h:52
lldb_private::process_gdb_remote::ProcessGDBRemote::HandleAsyncStdout
void HandleAsyncStdout(llvm::StringRef out) override
Definition: ProcessGDBRemote.cpp:4629
lldb_private::process_gdb_remote::ProcessGDBRemote::KillDebugserverProcess
void KillDebugserverProcess()
Definition: ProcessGDBRemote.cpp:3346
lldb_private::Debugger
Definition: Debugger.h:74
lldb_private::process_gdb_remote::ProcessGDBRemote::m_async_listener_sp
lldb::ListenerSP m_async_listener_sp
Definition: ProcessGDBRemote.h:259
lldb_private::process_gdb_remote::ProcessGDBRemote::DidVFork
void DidVFork(lldb::pid_t child_pid, lldb::tid_t child_tid) override
Called after a reported vfork.
Definition: ProcessGDBRemote.cpp:5239
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
lldb_private::process_gdb_remote::ProcessGDBRemote::m_async_thread_state_mutex
std::recursive_mutex m_async_thread_state_mutex
Definition: ProcessGDBRemote.h:261
lldb_private::process_gdb_remote::ProcessGDBRemote::CreateInstance
static lldb::ProcessSP CreateInstance(lldb::TargetSP target_sp, lldb::ListenerSP listener_sp, const FileSpec *crash_file_path, bool can_connect)
Definition: ProcessGDBRemote.cpp:196
lldb_private::process_gdb_remote::ProcessGDBRemote::DisableBreakpointSite
Status DisableBreakpointSite(BreakpointSite *bp_site) override
Definition: ProcessGDBRemote.cpp:2999
StringList.h
lldb_private::process_gdb_remote::ProcessGDBRemote::DoHalt
Status DoHalt(bool &caused_stop) override
Halts a running process.
Definition: ProcessGDBRemote.cpp:2305
Thread.h
lldb_private::process_gdb_remote::ProcessGDBRemote::m_allow_flash_writes
bool m_allow_flash_writes
Definition: ProcessGDBRemote.h:291
lldb_private::RangeVector< lldb::addr_t, size_t >
lldb_private::process_gdb_remote::ProcessGDBRemote::TraceGetBinaryData
llvm::Expected< std::vector< uint8_t > > TraceGetBinaryData(const TraceGetBinaryDataRequest &request) override
Get binary data given a trace technology and a data identifier.
Definition: ProcessGDBRemote.cpp:1144
LoadedModuleInfoList.h
lldb_private::process_gdb_remote::ProcessGDBRemote::UpdateThreadIDsFromStopReplyThreadsValue
size_t UpdateThreadIDsFromStopReplyThreadsValue(llvm::StringRef value)
Definition: ProcessGDBRemote.cpp:1391
lldb_private::ProcessAttachInfo
Definition: Process.h:113
lldb_private::process_gdb_remote::ProcessGDBRemote::GetMaxMemorySize
void GetMaxMemorySize()
Definition: ProcessGDBRemote.cpp:3879
lldb_private::process_gdb_remote::ProcessGDBRemote::eBroadcastBitAsyncThreadShouldExit
@ eBroadcastBitAsyncThreadShouldExit
Definition: ProcessGDBRemote.h:247
lldb_private::process_gdb_remote::ProcessGDBRemote::DoDestroy
Status DoDestroy() override
Definition: ProcessGDBRemote.cpp:2346
lldb_private::process_gdb_remote::ProcessGDBRemote::GetGDBServerRegisterInfoXMLAndProcess
bool GetGDBServerRegisterInfoXMLAndProcess(ArchSpec &arch_to_use, std::string xml_filename, std::vector< DynamicRegisterInfo::Register > &registers)
Definition: ProcessGDBRemote.cpp:4150
lldb_private::CommandObject
Definition: CommandObject.h:68
lldb_private::process_gdb_remote::ProcessGDBRemote::GetHostMacCatalystVersion
llvm::VersionTuple GetHostMacCatalystVersion() override
Definition: ProcessGDBRemote.cpp:3986
lldb::eStateStepping
@ eStateStepping
Process or thread is in the process of stepping and can not be examined.
Definition: lldb-enumerations.h:87
lldb_private::TraceStopRequest
jLLDBTraceStop gdb-remote packet
Definition: TraceGDBRemotePackets.h:64
lldb_private::process_gdb_remote::ProcessGDBRemote::DoGetMemoryRegionInfo
Status DoGetMemoryRegionInfo(lldb::addr_t load_addr, MemoryRegionInfo &region_info) override
DoGetMemoryRegionInfo is called by GetMemoryRegionInfo after it has removed non address bits from loa...
Definition: ProcessGDBRemote.cpp:2809
lldb_private::process_gdb_remote::ProcessGDBRemote::m_continue_S_tids
tid_sig_collection m_continue_S_tids
Definition: ProcessGDBRemote.h:278
lldb_private::ModuleSpec
Definition: ModuleSpec.h:27
lldb_private::process_gdb_remote::ProcessGDBRemote::PrefetchModuleSpecs
void PrefetchModuleSpecs(llvm::ArrayRef< FileSpec > module_file_specs, const llvm::Triple &triple) override
Definition: ProcessGDBRemote.cpp:3969
lldb_private::RangeVector< lldb::addr_t, size_t >::Entry
Range< lldb::addr_t, size_t > Entry
Definition: RangeMap.h:140
lldb_private::Status
Definition: Status.h:44
lldb_private::process_gdb_remote::ProcessGDBRemote::SetUnixSignals
void SetUnixSignals(const lldb::UnixSignalsSP &signals_sp)
Definition: ProcessGDBRemote.cpp:2418
lldb_private::process_gdb_remote::ProcessGDBRemote::Initialize
static void Initialize()
Definition: ProcessGDBRemote.cpp:3354
lldb_private::process_gdb_remote::ProcessGDBRemote::RefreshStateAfterStop
void RefreshStateAfterStop() override
Currently called as part of ShouldStop.
Definition: ProcessGDBRemote.cpp:2271
lldb_private::process_gdb_remote::ProcessGDBRemote::SetLastStopPacket
void SetLastStopPacket(const StringExtractorGDBRemote &response)
Definition: ProcessGDBRemote.cpp:2401
uint32_t
lldb_private::process_gdb_remote::ProcessGDBRemote::m_last_stop_packet_mutex
std::recursive_mutex m_last_stop_packet_mutex
Definition: ProcessGDBRemote.h:255
lldb::thread_result_t
void * thread_result_t
Definition: lldb-types.h:62
lldb_private::process_gdb_remote::ProcessGDBRemote::tid_collection
std::vector< lldb::tid_t > tid_collection
Definition: ProcessGDBRemote.h:262
lldb_private::process_gdb_remote::ProcessGDBRemote::m_last_signals_version
uint64_t m_last_signals_version
Definition: ProcessGDBRemote.h:420
lldb_private::process_gdb_remote::ProcessGDBRemote::HandleAsyncMisc
void HandleAsyncMisc(llvm::StringRef data) override
Definition: ProcessGDBRemote.cpp:4636
lldb_private::process_gdb_remote::ProcessGDBRemote::eBroadcastBitAsyncThreadDidExit
@ eBroadcastBitAsyncThreadDidExit
Definition: ProcessGDBRemote.h:248
lldb_private::process_gdb_remote::ProcessGDBRemote::IsAlive
bool IsAlive() override
Check if a process is still alive.
Definition: ProcessGDBRemote.cpp:2424
lldb_private::process_gdb_remote::ProcessGDBRemote::CanResume
bool CanResume(lldb::StateType state)
Definition: ProcessGDBRemote.h:307
lldb_private::process_gdb_remote::ProcessGDBRemote::DoWillAttachToProcessWithID
Status DoWillAttachToProcessWithID(lldb::pid_t pid) override
Called before attaching to a process.
Definition: ProcessGDBRemote.cpp:511
lldb::pid_t
uint64_t pid_t
Definition: lldb-types.h:85
lldb_private::process_gdb_remote::ProcessGDBRemote::DoWriteMemoryTags
Status DoWriteMemoryTags(lldb::addr_t addr, size_t len, int32_t type, const std::vector< uint8_t > &tags) override
Does the final operation to write memory tags.
Definition: ProcessGDBRemote.cpp:2553
lldb_private::process_gdb_remote::ProcessGDBRemote::GetPluginCommandObject
CommandObject * GetPluginCommandObject() override
Return a multi-word command object that can be used to expose plug-in specific commands.
Definition: ProcessGDBRemote.cpp:5130
StringExtractor.h
lldb_private::process_gdb_remote::ProcessGDBRemote::GetSharedCacheInfo
StructuredData::ObjectSP GetSharedCacheInfo() override
Definition: ProcessGDBRemote.cpp:3832
lldb_private::process_gdb_remote::ProcessGDBRemote::m_thread_pcs
std::vector< lldb::addr_t > m_thread_pcs
Definition: ProcessGDBRemote.h:268
lldb_private::process_gdb_remote::ProcessGDBRemote::TraceSupported
llvm::Expected< TraceSupportedResponse > TraceSupported() override
Get the processor tracing type supported for this process.
Definition: ProcessGDBRemote.cpp:1126
lldb_private::process_gdb_remote::ProcessGDBRemote::DoAllocateMemory
lldb::addr_t DoAllocateMemory(size_t size, uint32_t permissions, Status &error) override
Actually allocate memory in the process.
Definition: ProcessGDBRemote.cpp:2764
lldb_private::process_gdb_remote::ProcessGDBRemote::m_command_sp
lldb::CommandObjectSP m_command_sp
Definition: ProcessGDBRemote.h:286
lldb_private::process_gdb_remote::ProcessGDBRemote::m_continue_s_tids
tid_collection m_continue_s_tids
Definition: ProcessGDBRemote.h:277
lldb_private::process_gdb_remote::ProcessGDBRemote::DoWriteMemory
size_t DoWriteMemory(lldb::addr_t addr, const void *buf, size_t size, Status &error) override
Actually do the writing of memory to a process.
Definition: ProcessGDBRemote.cpp:2701
lldb_private::process_gdb_remote::ProcessGDBRemote::m_use_g_packet_for_reading
bool m_use_g_packet_for_reading
Definition: ProcessGDBRemote.h:289
lldb_private::process_gdb_remote::ProcessGDBRemote::GetAuxvData
DataExtractor GetAuxvData() override
Definition: ProcessGDBRemote.cpp:3707
lldb_private::process_gdb_remote::ProcessGDBRemote::DoReadMemory
size_t DoReadMemory(lldb::addr_t addr, void *buf, size_t size, Status &error) override
Actually do the reading of memory from a process.
Definition: ProcessGDBRemote.cpp:2471
ArchSpec.h
lldb_private::process_gdb_remote::ProcessGDBRemote::SupportsMemoryTagging
bool SupportsMemoryTagging() override
Check whether the process supports memory tagging.
Definition: ProcessGDBRemote.cpp:2530
lldb_private::process_gdb_remote::ProcessGDBRemote::m_jstopinfo_sp
StructuredData::ObjectSP m_jstopinfo_sp
Definition: ProcessGDBRemote.h:269
lldb_private::process_gdb_remote::ProcessGDBRemote::DidExec
void DidExec() override
Called after a process re-execs itself.
Definition: ProcessGDBRemote.cpp:5305
lldb_private::process_gdb_remote::ProcessGDBRemote::m_continue_C_tids
tid_sig_collection m_continue_C_tids
Definition: ProcessGDBRemote.h:276
lldb_private::process_gdb_remote::ProcessGDBRemote::ModuleCacheInfo::getHashValue
static unsigned getHashValue(const ModuleCacheKey &key)
Definition: ProcessGDBRemote.h:447
lldb_private::process_gdb_remote::ProcessGDBRemote::m_cached_module_specs
llvm::DenseMap< ModuleCacheKey, ModuleSpec, ModuleCacheInfo > m_cached_module_specs
Definition: ProcessGDBRemote.h:457
lldb_private::process_gdb_remote::ProcessGDBRemote::GetExtendedInfoForThread
StructuredData::ObjectSP GetExtendedInfoForThread(lldb::tid_t tid)
Definition: ProcessGDBRemote.cpp:3721
lldb_private::process_gdb_remote::ProcessGDBRemote::LoadModules
llvm::Error LoadModules() override
Sometimes processes know how to retrieve and load shared libraries.
Definition: ProcessGDBRemote.cpp:4497
Status.h
lldb_private::process_gdb_remote::ProcessGDBRemote::StopNoticingNewThreads
bool StopNoticingNewThreads() override
Call this to turn off the stop & notice new threads mode.
Definition: ProcessGDBRemote.cpp:3673
lldb::user_id_t
uint64_t user_id_t
Definition: lldb-types.h:84
lldb_private::process_gdb_remote::ProcessGDBRemote::GetDynamicLoader
DynamicLoader * GetDynamicLoader() override
Get the dynamic loader plug-in for this process.
Definition: ProcessGDBRemote.cpp:3684
lldb_private::process_gdb_remote::ProcessGDBRemote
Definition: ProcessGDBRemote.h:49
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::process_gdb_remote::ProcessGDBRemote::DoWillLaunch
Status DoWillLaunch(Module *module) override
Called before launching to a process.
Definition: ProcessGDBRemote.cpp:507
lldb_private::process_gdb_remote::ProcessGDBRemote::GetPluginNameStatic
static llvm::StringRef GetPluginNameStatic()
Definition: ProcessGDBRemote.h:65
Error
llvm::Error Error
Definition: UdtRecordCompleter.cpp:34
lldb_private::process_gdb_remote::ProcessGDBRemote::TraceStart
llvm::Error TraceStart(const llvm::json::Value &request) override
Start tracing a process or its threads.
Definition: ProcessGDBRemote.cpp:1134
lldb_private::process_gdb_remote::ProcessGDBRemote::m_waiting_for_attach
bool m_waiting_for_attach
Definition: ProcessGDBRemote.h:285
ConstString.h
StringExtractorGDBRemote
Definition: StringExtractorGDBRemote.h:21
lldb_private::process_gdb_remote::ProcessGDBRemote::GetDispatchQueueNameForThread
const char * GetDispatchQueueNameForThread(lldb::addr_t thread_dispatch_qaddr, std::string &dispatch_queue_name)
lldb_private::process_gdb_remote::ProcessGDBRemote::m_continue_c_tids
tid_collection m_continue_c_tids
Definition: ProcessGDBRemote.h:275
lldb::StateType
StateType
Process and Thread States.
Definition: lldb-enumerations.h:74
lldb_private::process_gdb_remote::ProcessGDBRemote::GetLoadedDynamicLibrariesInfos
StructuredData::ObjectSP GetLoadedDynamicLibrariesInfos() override
Definition: ProcessGDBRemote.cpp:3771
lldb_private::process_gdb_remote::ProcessGDBRemote::m_initial_tid
lldb::tid_t m_initial_tid
Definition: ProcessGDBRemote.h:288
lldb_private::process_gdb_remote::ProcessGDBRemote::DoConnectRemote
Status DoConnectRemote(llvm::StringRef remote_url) override
Attach to a remote system via a URL.
Definition: ProcessGDBRemote.cpp:520
lldb_private::process_gdb_remote::ProcessGDBRemote::m_thread_create_bp_sp
lldb::BreakpointSP m_thread_create_bp_sp
Definition: ProcessGDBRemote.h:284
lldb_private::process_gdb_remote::ProcessGDBRemote::LaunchAndConnectToDebugserver
Status LaunchAndConnectToDebugserver(const ProcessInfo &process_info)
Definition: ProcessGDBRemote.cpp:3196
lldb_private::process_gdb_remote::ProcessGDBRemote::ModuleCacheInfo::isEqual
static bool isEqual(const ModuleCacheKey &LHS, const ModuleCacheKey &RHS)
Definition: ProcessGDBRemote.h:451
lldb_private::Broadcaster
Definition: Broadcaster.h:242
lldb_private::process_gdb_remote::ProcessGDBRemote::ModuleCacheInfo::getTombstoneKey
static ModuleCacheKey getTombstoneKey()
Definition: ProcessGDBRemote.h:445
lldb_private::process_gdb_remote::ProcessGDBRemote::m_register_info_sp
GDBRemoteDynamicRegisterInfoSP m_register_info_sp
Definition: ProcessGDBRemote.h:257
lldb_private::process_gdb_remote::ProcessGDBRemote::m_addr_to_mmap_size
MMapMap m_addr_to_mmap_size
Definition: ProcessGDBRemote.h:283
lldb::eStateRunning
@ eStateRunning
Process or thread is running and can't be examined.
Definition: lldb-enumerations.h:86
lldb_private::process_gdb_remote::ProcessGDBRemote::GetModuleSpec
bool GetModuleSpec(const FileSpec &module_file_spec, const ArchSpec &arch, ModuleSpec &module_spec) override
Try to fetch the module specification for a module with the given file name and architecture.
Definition: ProcessGDBRemote.cpp:3937
lldb_private::process_gdb_remote::ProcessGDBRemote::GetPacketTimeout
static std::chrono::seconds GetPacketTimeout()
Definition: ProcessGDBRemote.cpp:206
lldb::QueueKind
QueueKind
Queue type.
Definition: lldb-enumerations.h:962
lldb_private::process_gdb_remote::ProcessGDBRemote::ModulesDidLoad
void ModulesDidLoad(ModuleList &module_list) override
Definition: ProcessGDBRemote.cpp:4619
lldb_private::process_gdb_remote::ProcessGDBRemote::GetSystemArchitecture
ArchSpec GetSystemArchitecture() override
Get the system architecture for this process.
Definition: ProcessGDBRemote.cpp:210
lldb_private::process_gdb_remote::ProcessGDBRemote::DoUpdateThreadList
bool DoUpdateThreadList(ThreadList &old_thread_list, ThreadList &new_thread_list) override
Update the thread list following process plug-in's specific logic.
Definition: ProcessGDBRemote.cpp:1485
lldb_private::process_gdb_remote::ProcessGDBRemote::UpdateThreadIDList
bool UpdateThreadIDList()
Definition: ProcessGDBRemote.cpp:1421
lldb_private::process_gdb_remote::ProcessGDBRemote::EnableWatchpoint
Status EnableWatchpoint(Watchpoint *wp, bool notify=true) override
Definition: ProcessGDBRemote.cpp:3064
GDBRemoteCommunicationClient.h
lldb::tid_t
uint64_t tid_t
Definition: lldb-types.h:86
lldb_private::process_gdb_remote::ProcessGDBRemote::DidAttach
void DidAttach(ArchSpec &process_arch) override
Called after attaching a process.
Definition: ProcessGDBRemote.cpp:1153
lldb_private::process_gdb_remote::ProcessGDBRemote::m_partial_profile_data
std::string m_partial_profile_data
Definition: ProcessGDBRemote.h:418