LLDB  mainline
Platform.h
Go to the documentation of this file.
1 //===-- Platform.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_TARGET_PLATFORM_H
10 #define LLDB_TARGET_PLATFORM_H
11 
12 #include <functional>
13 #include <map>
14 #include <memory>
15 #include <mutex>
16 #include <string>
17 #include <vector>
18 
21 #include "lldb/Host/File.h"
23 #include "lldb/Utility/ArchSpec.h"
25 #include "lldb/Utility/FileSpec.h"
27 #include "lldb/Utility/Timeout.h"
30 #include "lldb/lldb-public.h"
31 #include "llvm/Support/VersionTuple.h"
32 
33 namespace lldb_private {
34 
35 class ProcessInstanceInfo;
36 class ProcessInstanceInfoMatch;
37 typedef std::vector<ProcessInstanceInfo> ProcessInstanceInfoList;
38 
39 class ModuleCache;
41 
43 public:
45 
46  static ConstString GetSettingName();
47 
48  bool GetUseModuleCache() const;
49  bool SetUseModuleCache(bool use_module_cache);
50 
52  bool SetModuleCacheDirectory(const FileSpec &dir_spec);
53 
54 private:
55  void SetDefaultModuleCacheDirectory(const FileSpec &dir_spec);
56 };
57 
58 typedef llvm::SmallVector<lldb::addr_t, 6> MmapArgList;
59 
60 /// \class Platform Platform.h "lldb/Target/Platform.h"
61 /// A plug-in interface definition class for debug platform that
62 /// includes many platform abilities such as:
63 /// \li getting platform information such as supported architectures,
64 /// supported binary file formats and more
65 /// \li launching new processes
66 /// \li attaching to existing processes
67 /// \li download/upload files
68 /// \li execute shell commands
69 /// \li listing and getting info for existing processes
70 /// \li attaching and possibly debugging the platform's kernel
71 class Platform : public PluginInterface {
72 public:
73  /// Default Constructor
74  Platform(bool is_host_platform);
75 
76  /// The destructor is virtual since this class is designed to be inherited
77  /// from by the plug-in instance.
78  ~Platform() override;
79 
80  static void Initialize();
81 
82  static void Terminate();
83 
85 
86  /// Get the native host platform plug-in.
87  ///
88  /// There should only be one of these for each host that LLDB runs upon that
89  /// should be statically compiled in and registered using preprocessor
90  /// macros or other similar build mechanisms in a
91  /// PlatformSubclass::Initialize() function.
92  ///
93  /// This platform will be used as the default platform when launching or
94  /// attaching to processes unless another platform is specified.
95  static lldb::PlatformSP GetHostPlatform();
96 
97  static lldb::PlatformSP
98  GetPlatformForArchitecture(const ArchSpec &arch, ArchSpec *platform_arch_ptr);
99 
100  static const char *GetHostPlatformName();
101 
102  static void SetHostPlatform(const lldb::PlatformSP &platform_sp);
103 
104  // Find an existing platform plug-in by name
105  static lldb::PlatformSP Find(ConstString name);
106 
107  static lldb::PlatformSP Create(ConstString name, Status &error);
108 
109  static lldb::PlatformSP Create(const ArchSpec &arch,
110  ArchSpec *platform_arch_ptr, Status &error);
111 
112  /// Augments the triple either with information from platform or the host
113  /// system (if platform is null).
114  static ArchSpec GetAugmentedArchSpec(Platform *platform,
115  llvm::StringRef triple);
116 
117  /// Find a platform plugin for a given process.
118  ///
119  /// Scans the installed Platform plug-ins and tries to find an instance that
120  /// can be used for \a process
121  ///
122  /// \param[in] process
123  /// The process for which to try and locate a platform
124  /// plug-in instance.
125  ///
126  /// \param[in] plugin_name
127  /// An optional name of a specific platform plug-in that
128  /// should be used. If nullptr, pick the best plug-in.
129  // static lldb::PlatformSP
130  // FindPlugin (Process *process, ConstString plugin_name);
131 
132  /// Set the target's executable based off of the existing architecture
133  /// information in \a target given a path to an executable \a exe_file.
134  ///
135  /// Each platform knows the architectures that it supports and can select
136  /// the correct architecture slice within \a exe_file by inspecting the
137  /// architecture in \a target. If the target had an architecture specified,
138  /// then in can try and obey that request and optionally fail if the
139  /// architecture doesn't match up. If no architecture is specified, the
140  /// platform should select the default architecture from \a exe_file. Any
141  /// application bundles or executable wrappers can also be inspected for the
142  /// actual application binary within the bundle that should be used.
143  ///
144  /// \return
145  /// Returns \b true if this Platform plug-in was able to find
146  /// a suitable executable, \b false otherwise.
147  virtual Status ResolveExecutable(const ModuleSpec &module_spec,
148  lldb::ModuleSP &module_sp,
149  const FileSpecList *module_search_paths_ptr);
150 
151  /// Find a symbol file given a symbol file module specification.
152  ///
153  /// Each platform might have tricks to find symbol files for an executable
154  /// given information in a symbol file ModuleSpec. Some platforms might also
155  /// support symbol files that are bundles and know how to extract the right
156  /// symbol file given a bundle.
157  ///
158  /// \param[in] target
159  /// The target in which we are trying to resolve the symbol file.
160  /// The target has a list of modules that we might be able to
161  /// use in order to help find the right symbol file. If the
162  /// "m_file" or "m_platform_file" entries in the \a sym_spec
163  /// are filled in, then we might be able to locate a module in
164  /// the target, extract its UUID and locate a symbol file.
165  /// If just the "m_uuid" is specified, then we might be able
166  /// to find the module in the target that matches that UUID
167  /// and pair the symbol file along with it. If just "m_symbol_file"
168  /// is specified, we can use a variety of tricks to locate the
169  /// symbols in an SDK, PDK, or other development kit location.
170  ///
171  /// \param[in] sym_spec
172  /// A module spec that describes some information about the
173  /// symbol file we are trying to resolve. The ModuleSpec might
174  /// contain the following:
175  /// m_file - A full or partial path to an executable from the
176  /// target (might be empty).
177  /// m_platform_file - Another executable hint that contains
178  /// the path to the file as known on the
179  /// local/remote platform.
180  /// m_symbol_file - A full or partial path to a symbol file
181  /// or symbol bundle that should be used when
182  /// trying to resolve the symbol file.
183  /// m_arch - The architecture we are looking for when resolving
184  /// the symbol file.
185  /// m_uuid - The UUID of the executable and symbol file. This
186  /// can often be used to match up an executable with
187  /// a symbol file, or resolve an symbol file in a
188  /// symbol file bundle.
189  ///
190  /// \param[out] sym_file
191  /// The resolved symbol file spec if the returned error
192  /// indicates success.
193  ///
194  /// \return
195  /// Returns an error that describes success or failure.
196  virtual Status ResolveSymbolFile(Target &target, const ModuleSpec &sym_spec,
197  FileSpec &sym_file);
198 
199  /// Resolves the FileSpec to a (possibly) remote path. Remote platforms must
200  /// override this to resolve to a path on the remote side.
201  virtual bool ResolveRemotePath(const FileSpec &platform_path,
202  FileSpec &resolved_platform_path);
203 
204  /// Get the OS version from a connected platform.
205  ///
206  /// Some platforms might not be connected to a remote platform, but can
207  /// figure out the OS version for a process. This is common for simulator
208  /// platforms that will run native programs on the current host, but the
209  /// simulator might be simulating a different OS. The \a process parameter
210  /// might be specified to help to determine the OS version.
211  virtual llvm::VersionTuple GetOSVersion(Process *process = nullptr);
212 
213  bool SetOSVersion(llvm::VersionTuple os_version);
214 
215  llvm::Optional<std::string> GetOSBuildString();
216 
217  llvm::Optional<std::string> GetOSKernelDescription();
218 
219  // Returns the name of the platform
221 
222  virtual const char *GetHostname();
223 
224  virtual ConstString GetFullNameForDylib(ConstString basename);
225 
226  virtual llvm::StringRef GetDescription() = 0;
227 
228  /// Report the current status for this platform.
229  ///
230  /// The returned string usually involves returning the OS version (if
231  /// available), and any SDK directory that might be being used for local
232  /// file caching, and if connected a quick blurb about what this platform is
233  /// connected to.
234  virtual void GetStatus(Stream &strm);
235 
236  // Subclasses must be able to fetch the current OS version
237  //
238  // Remote classes must be connected for this to succeed. Local subclasses
239  // don't need to override this function as it will just call the
240  // HostInfo::GetOSVersion().
241  virtual bool GetRemoteOSVersion() { return false; }
242 
243  virtual llvm::Optional<std::string> GetRemoteOSBuildString() {
244  return llvm::None;
245  }
246 
247  virtual llvm::Optional<std::string> GetRemoteOSKernelDescription() {
248  return llvm::None;
249  }
250 
251  // Remote Platform subclasses need to override this function
253  return ArchSpec(); // Return an invalid architecture
254  }
255 
257 
258  virtual bool SetRemoteWorkingDirectory(const FileSpec &working_dir);
259 
260  virtual UserIDResolver &GetUserIDResolver() = 0;
261 
262  /// Locate a file for a platform.
263  ///
264  /// The default implementation of this function will return the same file
265  /// patch in \a local_file as was in \a platform_file.
266  ///
267  /// \param[in] platform_file
268  /// The platform file path to locate and cache locally.
269  ///
270  /// \param[in] uuid_ptr
271  /// If we know the exact UUID of the file we are looking for, it
272  /// can be specified. If it is not specified, we might now know
273  /// the exact file. The UUID is usually some sort of MD5 checksum
274  /// for the file and is sometimes known by dynamic linkers/loaders.
275  /// If the UUID is known, it is best to supply it to platform
276  /// file queries to ensure we are finding the correct file, not
277  /// just a file at the correct path.
278  ///
279  /// \param[out] local_file
280  /// A locally cached version of the platform file. For platforms
281  /// that describe the current host computer, this will just be
282  /// the same file. For remote platforms, this file might come from
283  /// and SDK directory, or might need to be sync'ed over to the
284  /// current machine for efficient debugging access.
285  ///
286  /// \return
287  /// An error object.
288  virtual Status GetFileWithUUID(const FileSpec &platform_file,
289  const UUID *uuid_ptr, FileSpec &local_file);
290 
291  // Locate the scripting resource given a module specification.
292  //
293  // Locating the file should happen only on the local computer or using the
294  // current computers global settings.
295  virtual FileSpecList
297  Stream *feedback_stream);
298 
299  virtual Status GetSharedModule(
300  const ModuleSpec &module_spec, Process *process,
301  lldb::ModuleSP &module_sp, const FileSpecList *module_search_paths_ptr,
302  llvm::SmallVectorImpl<lldb::ModuleSP> *old_modules, bool *did_create_ptr);
303 
304  virtual bool GetModuleSpec(const FileSpec &module_file_spec,
305  const ArchSpec &arch, ModuleSpec &module_spec);
306 
307  virtual Status ConnectRemote(Args &args);
308 
309  virtual Status DisconnectRemote();
310 
311  /// Get the platform's supported architectures in the order in which they
312  /// should be searched.
313  virtual std::vector<ArchSpec> GetSupportedArchitectures() = 0;
314 
315  virtual size_t GetSoftwareBreakpointTrapOpcode(Target &target,
316  BreakpointSite *bp_site);
317 
318  /// Launch a new process on a platform, not necessarily for debugging, it
319  /// could be just for running the process.
320  virtual Status LaunchProcess(ProcessLaunchInfo &launch_info);
321 
322  /// Perform expansion of the command-line for this launch info This can
323  /// potentially involve wildcard expansion
324  /// environment variable replacement, and whatever other
325  /// argument magic the platform defines as part of its typical
326  /// user experience
327  virtual Status ShellExpandArguments(ProcessLaunchInfo &launch_info);
328 
329  /// Kill process on a platform.
330  virtual Status KillProcess(const lldb::pid_t pid);
331 
332  /// Lets a platform answer if it is compatible with a given architecture and
333  /// the target triple contained within.
334  virtual bool IsCompatibleArchitecture(const ArchSpec &arch,
335  bool exact_arch_match,
336  ArchSpec *compatible_arch_ptr);
337 
338  /// Not all platforms will support debugging a process by spawning somehow
339  /// halted for a debugger (specified using the "eLaunchFlagDebug" launch
340  /// flag) and then attaching. If your platform doesn't support this,
341  /// override this function and return false.
342  virtual bool CanDebugProcess() { return true; }
343 
344  /// Subclasses do not need to implement this function as it uses the
345  /// Platform::LaunchProcess() followed by Platform::Attach (). Remote
346  /// platforms will want to subclass this function in order to be able to
347  /// intercept STDIO and possibly launch a separate process that will debug
348  /// the debuggee.
349  virtual lldb::ProcessSP DebugProcess(ProcessLaunchInfo &launch_info,
350  Debugger &debugger, Target &target,
351  Status &error);
352 
353  virtual lldb::ProcessSP ConnectProcess(llvm::StringRef connect_url,
354  llvm::StringRef plugin_name,
355  Debugger &debugger, Target *target,
356  Status &error);
357 
358  virtual lldb::ProcessSP
359  ConnectProcessSynchronous(llvm::StringRef connect_url,
360  llvm::StringRef plugin_name, Debugger &debugger,
361  Stream &stream, Target *target, Status &error);
362 
363  /// Attach to an existing process using a process ID.
364  ///
365  /// Each platform subclass needs to implement this function and attempt to
366  /// attach to the process with the process ID of \a pid. The platform
367  /// subclass should return an appropriate ProcessSP subclass that is
368  /// attached to the process, or an empty shared pointer with an appropriate
369  /// error.
370  ///
371  /// \return
372  /// An appropriate ProcessSP containing a valid shared pointer
373  /// to the default Process subclass for the platform that is
374  /// attached to the process, or an empty shared pointer with an
375  /// appropriate error fill into the \a error object.
376  virtual lldb::ProcessSP Attach(ProcessAttachInfo &attach_info,
377  Debugger &debugger,
378  Target *target, // Can be nullptr, if nullptr
379  // create a new target, else
380  // use existing one
381  Status &error) = 0;
382 
383  /// Attach to an existing process by process name.
384  ///
385  /// This function is not meant to be overridden by Process subclasses. It
386  /// will first call Process::WillAttach (const char *) and if that returns
387  /// \b true, Process::DoAttach (const char *) will be called to actually do
388  /// the attach. If DoAttach returns \b true, then Process::DidAttach() will
389  /// be called.
390  ///
391  /// \param[in] process_name
392  /// A process name to match against the current process list.
393  ///
394  /// \return
395  /// Returns \a pid if attaching was successful, or
396  /// LLDB_INVALID_PROCESS_ID if attaching fails.
397  // virtual lldb::ProcessSP
398  // Attach (const char *process_name,
399  // bool wait_for_launch,
400  // Status &error) = 0;
401 
402  // The base class Platform will take care of the host platform. Subclasses
403  // will need to fill in the remote case.
404  virtual uint32_t FindProcesses(const ProcessInstanceInfoMatch &match_info,
405  ProcessInstanceInfoList &proc_infos);
406 
407  virtual bool GetProcessInfo(lldb::pid_t pid, ProcessInstanceInfo &proc_info);
408 
409  // Set a breakpoint on all functions that can end up creating a thread for
410  // this platform. This is needed when running expressions and also for
411  // process control.
412  virtual lldb::BreakpointSP SetThreadCreationBreakpoint(Target &target);
413 
414  // Given a target, find the local SDK directory if one exists on the current
415  // host.
418  return lldb_private::ConstString();
419  }
420 
421  const std::string &GetRemoteURL() const { return m_remote_url; }
422 
423  bool IsHost() const {
424  return m_is_host; // Is this the default host platform?
425  }
426 
427  bool IsRemote() const { return !m_is_host; }
428 
429  virtual bool IsConnected() const {
430  // Remote subclasses should override this function
431  return IsHost();
432  }
433 
435 
436  void SetSystemArchitecture(const ArchSpec &arch) {
437  m_system_arch = arch;
438  if (IsHost())
440  }
441 
442  /// If the triple contains not specify the vendor, os, and environment
443  /// parts, we "augment" these using information from the platform and return
444  /// the resulting ArchSpec object.
445  ArchSpec GetAugmentedArchSpec(llvm::StringRef triple);
446 
447  // Used for column widths
448  size_t GetMaxUserIDNameLength() const { return m_max_uid_name_len; }
449 
450  // Used for column widths
451  size_t GetMaxGroupIDNameLength() const { return m_max_gid_name_len; }
452 
454 
456 
457  ConstString GetSDKBuild() const { return m_sdk_build; }
458 
459  void SetSDKBuild(ConstString sdk_build) { m_sdk_build = sdk_build; }
460 
461  // Override this to return true if your platform supports Clang modules. You
462  // may also need to override AddClangModuleCompilationOptions to pass the
463  // right Clang flags for your platform.
464  virtual bool SupportsModules() { return false; }
465 
466  // Appends the platform-specific options required to find the modules for the
467  // current platform.
468  virtual void
470  std::vector<std::string> &options);
471 
473 
474  bool SetWorkingDirectory(const FileSpec &working_dir);
475 
476  // There may be modules that we don't want to find by default for operations
477  // like "setting breakpoint by name". The platform will return "true" from
478  // this call if the passed in module happens to be one of these.
479 
480  virtual bool
482  const lldb::ModuleSP &module_sp) {
483  return false;
484  }
485 
486  virtual Status MakeDirectory(const FileSpec &file_spec, uint32_t permissions);
487 
488  virtual Status GetFilePermissions(const FileSpec &file_spec,
489  uint32_t &file_permissions);
490 
491  virtual Status SetFilePermissions(const FileSpec &file_spec,
492  uint32_t file_permissions);
493 
494  virtual lldb::user_id_t OpenFile(const FileSpec &file_spec,
495  File::OpenOptions flags, uint32_t mode,
496  Status &error) {
497  return UINT64_MAX;
498  }
499 
500  virtual bool CloseFile(lldb::user_id_t fd, Status &error) { return false; }
501 
502  virtual lldb::user_id_t GetFileSize(const FileSpec &file_spec) {
503  return UINT64_MAX;
504  }
505 
507  bool only_dir) {}
508 
509  virtual uint64_t ReadFile(lldb::user_id_t fd, uint64_t offset, void *dst,
510  uint64_t dst_len, Status &error) {
511  error.SetErrorStringWithFormat(
512  "Platform::ReadFile() is not supported in the %s platform",
513  GetName().GetCString());
514  return -1;
515  }
516 
517  virtual uint64_t WriteFile(lldb::user_id_t fd, uint64_t offset,
518  const void *src, uint64_t src_len, Status &error) {
519  error.SetErrorStringWithFormat(
520  "Platform::WriteFile() is not supported in the %s platform",
521  GetName().GetCString());
522  return -1;
523  }
524 
525  virtual Status GetFile(const FileSpec &source, const FileSpec &destination);
526 
527  virtual Status PutFile(const FileSpec &source, const FileSpec &destination,
528  uint32_t uid = UINT32_MAX, uint32_t gid = UINT32_MAX);
529 
530  virtual Status
531  CreateSymlink(const FileSpec &src, // The name of the link is in src
532  const FileSpec &dst); // The symlink points to dst
533 
534  /// Install a file or directory to the remote system.
535  ///
536  /// Install is similar to Platform::PutFile(), but it differs in that if an
537  /// application/framework/shared library is installed on a remote platform
538  /// and the remote platform requires something to be done to register the
539  /// application/framework/shared library, then this extra registration can
540  /// be done.
541  ///
542  /// \param[in] src
543  /// The source file/directory to install on the remote system.
544  ///
545  /// \param[in] dst
546  /// The destination file/directory where \a src will be installed.
547  /// If \a dst has no filename specified, then its filename will
548  /// be set from \a src. It \a dst has no directory specified, it
549  /// will use the platform working directory. If \a dst has a
550  /// directory specified, but the directory path is relative, the
551  /// platform working directory will be prepended to the relative
552  /// directory.
553  ///
554  /// \return
555  /// An error object that describes anything that went wrong.
556  virtual Status Install(const FileSpec &src, const FileSpec &dst);
557 
558  virtual Environment GetEnvironment();
559 
560  virtual bool GetFileExists(const lldb_private::FileSpec &file_spec);
561 
562  virtual Status Unlink(const FileSpec &file_spec);
563 
564  virtual MmapArgList GetMmapArgumentList(const ArchSpec &arch,
565  lldb::addr_t addr,
566  lldb::addr_t length,
567  unsigned prot, unsigned flags,
568  lldb::addr_t fd, lldb::addr_t offset);
569 
570  virtual bool GetSupportsRSync() { return m_supports_rsync; }
571 
572  virtual void SetSupportsRSync(bool flag) { m_supports_rsync = flag; }
573 
574  virtual const char *GetRSyncOpts() { return m_rsync_opts.c_str(); }
575 
576  virtual void SetRSyncOpts(const char *opts) { m_rsync_opts.assign(opts); }
577 
578  virtual const char *GetRSyncPrefix() { return m_rsync_prefix.c_str(); }
579 
580  virtual void SetRSyncPrefix(const char *prefix) {
581  m_rsync_prefix.assign(prefix);
582  }
583 
584  virtual bool GetSupportsSSH() { return m_supports_ssh; }
585 
586  virtual void SetSupportsSSH(bool flag) { m_supports_ssh = flag; }
587 
588  virtual const char *GetSSHOpts() { return m_ssh_opts.c_str(); }
589 
590  virtual void SetSSHOpts(const char *opts) { m_ssh_opts.assign(opts); }
591 
593 
594  virtual void SetIgnoresRemoteHostname(bool flag) {
596  }
597 
600  return nullptr;
601  }
602 
604  llvm::StringRef command,
605  const FileSpec &working_dir, // Pass empty FileSpec to use the current
606  // working directory
607  int *status_ptr, // Pass nullptr if you don't want the process exit status
608  int *signo_ptr, // Pass nullptr if you don't want the signal that caused
609  // the process to exit
611  *command_output, // Pass nullptr if you don't want the command output
612  const Timeout<std::micro> &timeout);
613 
615  llvm::StringRef shell, llvm::StringRef command,
616  const FileSpec &working_dir, // Pass empty FileSpec to use the current
617  // working directory
618  int *status_ptr, // Pass nullptr if you don't want the process exit status
619  int *signo_ptr, // Pass nullptr if you don't want the signal that caused
620  // the process to exit
622  *command_output, // Pass nullptr if you don't want the command output
623  const Timeout<std::micro> &timeout);
624 
625  virtual void SetLocalCacheDirectory(const char *local);
626 
627  virtual const char *GetLocalCacheDirectory();
628 
630 
631  virtual bool CalculateMD5(const FileSpec &file_spec, uint64_t &low,
632  uint64_t &high);
633 
635  return 1;
636  }
637 
638  virtual const lldb::UnixSignalsSP &GetRemoteUnixSignals();
639 
640  lldb::UnixSignalsSP GetUnixSignals();
641 
642  /// Locate a queue name given a thread's qaddr
643  ///
644  /// On a system using libdispatch ("Grand Central Dispatch") style queues, a
645  /// thread may be associated with a GCD queue or not, and a queue may be
646  /// associated with multiple threads. The process/thread must provide a way
647  /// to find the "dispatch_qaddr" for each thread, and from that
648  /// dispatch_qaddr this Platform method will locate the queue name and
649  /// provide that.
650  ///
651  /// \param[in] process
652  /// A process is required for reading memory.
653  ///
654  /// \param[in] dispatch_qaddr
655  /// The dispatch_qaddr for this thread.
656  ///
657  /// \return
658  /// The name of the queue, if there is one. An empty string
659  /// means that this thread is not associated with a dispatch
660  /// queue.
661  virtual std::string
663  return "";
664  }
665 
666  /// Locate a queue ID given a thread's qaddr
667  ///
668  /// On a system using libdispatch ("Grand Central Dispatch") style queues, a
669  /// thread may be associated with a GCD queue or not, and a queue may be
670  /// associated with multiple threads. The process/thread must provide a way
671  /// to find the "dispatch_qaddr" for each thread, and from that
672  /// dispatch_qaddr this Platform method will locate the queue ID and provide
673  /// that.
674  ///
675  /// \param[in] process
676  /// A process is required for reading memory.
677  ///
678  /// \param[in] dispatch_qaddr
679  /// The dispatch_qaddr for this thread.
680  ///
681  /// \return
682  /// The queue_id for this thread, if this thread is associated
683  /// with a dispatch queue. Else LLDB_INVALID_QUEUE_ID is returned.
684  virtual lldb::queue_id_t
686  return LLDB_INVALID_QUEUE_ID;
687  }
688 
689  /// Provide a list of trap handler function names for this platform
690  ///
691  /// The unwinder needs to treat trap handlers specially -- the stack frame
692  /// may not be aligned correctly for a trap handler (the kernel often won't
693  /// perturb the stack pointer, or won't re-align it properly, in the process
694  /// of calling the handler) and the frame above the handler needs to be
695  /// treated by the unwinder's "frame 0" rules instead of its "middle of the
696  /// stack frame" rules.
697  ///
698  /// In a user process debugging scenario, the list of trap handlers is
699  /// typically just "_sigtramp".
700  ///
701  /// The Platform base class provides the m_trap_handlers ivar but it does
702  /// not populate it. Subclasses should add the names of the asynchronous
703  /// signal handler routines as needed. For most Unix platforms, add
704  /// _sigtramp.
705  ///
706  /// \return
707  /// A list of symbol names. The list may be empty.
708  virtual const std::vector<ConstString> &GetTrapHandlerSymbolNames();
709 
710  /// Try to get a specific unwind plan for a named trap handler.
711  /// The default is not to have specific unwind plans for trap handlers.
712  ///
713  /// \param[in] triple
714  /// Triple of the current target.
715  ///
716  /// \param[in] name
717  /// Name of the trap handler function.
718  ///
719  /// \return
720  /// A specific unwind plan for that trap handler, or an empty
721  /// shared pointer. The latter means there is no specific plan,
722  /// unwind as normal.
723  virtual lldb::UnwindPlanSP
724  GetTrapHandlerUnwindPlan(const llvm::Triple &triple, ConstString name) {
725  return {};
726  }
727 
728  /// Find a support executable that may not live within in the standard
729  /// locations related to LLDB.
730  ///
731  /// Executable might exist within the Platform SDK directories, or in
732  /// standard tool directories within the current IDE that is running LLDB.
733  ///
734  /// \param[in] basename
735  /// The basename of the executable to locate in the current
736  /// platform.
737  ///
738  /// \return
739  /// A FileSpec pointing to the executable on disk, or an invalid
740  /// FileSpec if the executable cannot be found.
741  virtual FileSpec LocateExecutable(const char *basename) { return FileSpec(); }
742 
743  /// Allow the platform to set preferred memory cache line size. If non-zero
744  /// (and the user has not set cache line size explicitly), this value will
745  /// be used as the cache line size for memory reads.
746  virtual uint32_t GetDefaultMemoryCacheLineSize() { return 0; }
747 
748  /// Load a shared library into this process.
749  ///
750  /// Try and load a shared library into the current process. This call might
751  /// fail in the dynamic loader plug-in says it isn't safe to try and load
752  /// shared libraries at the moment.
753  ///
754  /// \param[in] process
755  /// The process to load the image.
756  ///
757  /// \param[in] local_file
758  /// The file spec that points to the shared library that you want
759  /// to load if the library is located on the host. The library will
760  /// be copied over to the location specified by remote_file or into
761  /// the current working directory with the same filename if the
762  /// remote_file isn't specified.
763  ///
764  /// \param[in] remote_file
765  /// If local_file is specified then the location where the library
766  /// should be copied over from the host. If local_file isn't
767  /// specified, then the path for the shared library on the target
768  /// what you want to load.
769  ///
770  /// \param[out] error
771  /// An error object that gets filled in with any errors that
772  /// might occur when trying to load the shared library.
773  ///
774  /// \return
775  /// A token that represents the shared library that can be
776  /// later used to unload the shared library. A value of
777  /// LLDB_INVALID_IMAGE_TOKEN will be returned if the shared
778  /// library can't be opened.
780  const lldb_private::FileSpec &local_file,
781  const lldb_private::FileSpec &remote_file,
783 
784  /// Load a shared library specified by base name into this process,
785  /// looking by hand along a set of paths.
786  ///
787  /// \param[in] process
788  /// The process to load the image.
789  ///
790  /// \param[in] library_name
791  /// The name of the library to look for. If library_name is an
792  /// absolute path, the basename will be extracted and searched for
793  /// along the paths. This emulates the behavior of the loader when
794  /// given an install name and a set (e.g. DYLD_LIBRARY_PATH provided) of
795  /// alternate paths.
796  ///
797  /// \param[in] paths
798  /// The list of paths to use to search for the library. First
799  /// match wins.
800  ///
801  /// \param[out] error
802  /// An error object that gets filled in with any errors that
803  /// might occur when trying to load the shared library.
804  ///
805  /// \param[out] loaded_path
806  /// If non-null, the path to the dylib that was successfully loaded
807  /// is stored in this path.
808  ///
809  /// \return
810  /// A token that represents the shared library which can be
811  /// passed to UnloadImage. A value of
812  /// LLDB_INVALID_IMAGE_TOKEN will be returned if the shared
813  /// library can't be opened.
815  const lldb_private::FileSpec &library_name,
816  const std::vector<std::string> &paths,
818  lldb_private::FileSpec *loaded_path);
819 
820  virtual uint32_t DoLoadImage(lldb_private::Process *process,
821  const lldb_private::FileSpec &remote_file,
822  const std::vector<std::string> *paths,
824  lldb_private::FileSpec *loaded_path = nullptr);
825 
826  virtual Status UnloadImage(lldb_private::Process *process,
827  uint32_t image_token);
828 
829  /// Connect to all processes waiting for a debugger to attach
830  ///
831  /// If the platform have a list of processes waiting for a debugger to
832  /// connect to them then connect to all of these pending processes.
833  ///
834  /// \param[in] debugger
835  /// The debugger used for the connect.
836  ///
837  /// \param[out] error
838  /// If an error occurred during the connect then this object will
839  /// contain the error message.
840  ///
841  /// \return
842  /// The number of processes we are successfully connected to.
843  virtual size_t ConnectToWaitingProcesses(lldb_private::Debugger &debugger,
845 
846  /// Gather all of crash informations into a structured data dictionary.
847  ///
848  /// If the platform have a crashed process with crash information entries,
849  /// gather all the entries into an structured data dictionary or return a
850  /// nullptr. This dictionary is generic and extensible, as it contains an
851  /// array for each different type of crash information.
852  ///
853  /// \param[in] process
854  /// The crashed process.
855  ///
856  /// \return
857  /// A structured data dictionary containing at each entry, the crash
858  /// information type as the entry key and the matching an array as the
859  /// entry value. \b nullptr if not implemented or if the process has no
860  /// crash information entry. \b error if an error occured.
861  virtual llvm::Expected<StructuredData::DictionarySP>
863  return nullptr;
864  }
865 
866 protected:
867  /// Create a list of ArchSpecs with the given OS and a architectures. The
868  /// vendor field is left as an "unspecified unknown".
869  static std::vector<ArchSpec>
870  CreateArchList(llvm::ArrayRef<llvm::Triple::ArchType> archs,
871  llvm::Triple::OSType os);
872 
873  /// Private implementation of connecting to a process. If the stream is set
874  /// we connect synchronously.
875  lldb::ProcessSP DoConnectProcess(llvm::StringRef connect_url,
876  llvm::StringRef plugin_name,
877  Debugger &debugger, Stream *stream,
878  Target *target, Status &error);
879  bool m_is_host;
880  // Set to true when we are able to actually set the OS version while being
881  // connected. For remote platforms, we might set the version ahead of time
882  // before we actually connect and this version might change when we actually
883  // connect to a remote platform. For the host platform this will be set to
884  // the once we call HostInfo::GetOSVersion().
888  m_sdk_sysroot; // the root location of where the SDK files are all located
890  FileSpec m_working_dir; // The working directory which is used when installing
891  // modules that have no install path set
894  llvm::VersionTuple m_os_version;
895  ArchSpec
896  m_system_arch; // The architecture of the kernel or the remote platform
897  typedef std::map<uint32_t, ConstString> IDToNameMap;
898  // Mutex for modifying Platform data structures that should only be used for
899  // non-reentrant code
900  std::mutex m_mutex;
910  std::vector<ConstString> m_trap_handlers;
912  const std::unique_ptr<ModuleCache> m_module_cache;
913 
914  /// Ask the Platform subclass to fill in the list of trap handler names
915  ///
916  /// For most Unix user process environments, this will be a single function
917  /// name, _sigtramp. More specialized environments may have additional
918  /// handler names. The unwinder code needs to know when a trap handler is
919  /// on the stack because the unwind rules for the frame that caused the trap
920  /// are different.
921  ///
922  /// The base class Platform ivar m_trap_handlers should be updated by the
923  /// Platform subclass when this method is called. If there are no
924  /// predefined trap handlers, this method may be a no-op.
925  virtual void CalculateTrapHandlerSymbolNames() = 0;
926 
927  Status GetCachedExecutable(ModuleSpec &module_spec, lldb::ModuleSP &module_sp,
928  const FileSpecList *module_search_paths_ptr);
929 
930  virtual Status DownloadModuleSlice(const FileSpec &src_file_spec,
931  const uint64_t src_offset,
932  const uint64_t src_size,
933  const FileSpec &dst_file_spec);
934 
935  virtual Status DownloadSymbolFile(const lldb::ModuleSP &module_sp,
936  const FileSpec &dst_file_spec);
937 
938  virtual const char *GetCacheHostname();
939 
940  virtual Status
941  ResolveRemoteExecutable(const ModuleSpec &module_spec,
942  lldb::ModuleSP &exe_module_sp,
943  const FileSpecList *module_search_paths_ptr);
944 
945 private:
946  typedef std::function<Status(const ModuleSpec &)> ModuleResolver;
947 
948  Status GetRemoteSharedModule(const ModuleSpec &module_spec, Process *process,
949  lldb::ModuleSP &module_sp,
950  const ModuleResolver &module_resolver,
951  bool *did_create_ptr);
952 
953  bool GetCachedSharedModule(const ModuleSpec &module_spec,
954  lldb::ModuleSP &module_sp, bool *did_create_ptr);
955 
957 };
958 
960 public:
962 
963  ~PlatformList() = default;
964 
965  void Append(const lldb::PlatformSP &platform_sp, bool set_selected) {
966  std::lock_guard<std::recursive_mutex> guard(m_mutex);
967  m_platforms.push_back(platform_sp);
968  if (set_selected)
970  }
971 
972  size_t GetSize() {
973  std::lock_guard<std::recursive_mutex> guard(m_mutex);
974  return m_platforms.size();
975  }
976 
977  lldb::PlatformSP GetAtIndex(uint32_t idx) {
978  lldb::PlatformSP platform_sp;
979  {
980  std::lock_guard<std::recursive_mutex> guard(m_mutex);
981  if (idx < m_platforms.size())
982  platform_sp = m_platforms[idx];
983  }
984  return platform_sp;
985  }
986 
987  /// Select the active platform.
988  ///
989  /// In order to debug remotely, other platform's can be remotely connected
990  /// to and set as the selected platform for any subsequent debugging. This
991  /// allows connection to remote targets and allows the ability to discover
992  /// process info, launch and attach to remote processes.
993  lldb::PlatformSP GetSelectedPlatform() {
994  std::lock_guard<std::recursive_mutex> guard(m_mutex);
995  if (!m_selected_platform_sp && !m_platforms.empty())
997 
998  return m_selected_platform_sp;
999  }
1000 
1001  void SetSelectedPlatform(const lldb::PlatformSP &platform_sp) {
1002  if (platform_sp) {
1003  std::lock_guard<std::recursive_mutex> guard(m_mutex);
1004  const size_t num_platforms = m_platforms.size();
1005  for (size_t idx = 0; idx < num_platforms; ++idx) {
1006  if (m_platforms[idx].get() == platform_sp.get()) {
1008  return;
1009  }
1010  }
1011  m_platforms.push_back(platform_sp);
1013  }
1014  }
1015 
1016 protected:
1017  typedef std::vector<lldb::PlatformSP> collection;
1018  mutable std::recursive_mutex m_mutex;
1020  lldb::PlatformSP m_selected_platform_sp;
1021 
1022 private:
1023  PlatformList(const PlatformList &) = delete;
1024  const PlatformList &operator=(const PlatformList &) = delete;
1025 };
1026 
1028 public:
1029  OptionGroupPlatformRSync() = default;
1030 
1031  ~OptionGroupPlatformRSync() override = default;
1032 
1034  SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
1035  ExecutionContext *execution_context) override;
1036 
1037  void OptionParsingStarting(ExecutionContext *execution_context) override;
1038 
1039  llvm::ArrayRef<OptionDefinition> GetDefinitions() override;
1040 
1041  // Instance variables to hold the values for command options.
1042 
1043  bool m_rsync;
1047 
1048 private:
1050  const OptionGroupPlatformRSync &
1051  operator=(const OptionGroupPlatformRSync &) = delete;
1052 };
1053 
1055 public:
1056  OptionGroupPlatformSSH() = default;
1057 
1058  ~OptionGroupPlatformSSH() override = default;
1059 
1061  SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
1062  ExecutionContext *execution_context) override;
1063 
1064  void OptionParsingStarting(ExecutionContext *execution_context) override;
1065 
1066  llvm::ArrayRef<OptionDefinition> GetDefinitions() override;
1067 
1068  // Instance variables to hold the values for command options.
1069 
1070  bool m_ssh;
1072 
1073 private:
1075  const OptionGroupPlatformSSH &
1076  operator=(const OptionGroupPlatformSSH &) = delete;
1077 };
1078 
1080 public:
1081  OptionGroupPlatformCaching() = default;
1082 
1083  ~OptionGroupPlatformCaching() override = default;
1084 
1086  SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
1087  ExecutionContext *execution_context) override;
1088 
1089  void OptionParsingStarting(ExecutionContext *execution_context) override;
1090 
1091  llvm::ArrayRef<OptionDefinition> GetDefinitions() override;
1092 
1093  // Instance variables to hold the values for command options.
1094 
1096 
1097 private:
1100  operator=(const OptionGroupPlatformCaching &) = delete;
1101 };
1102 
1103 } // namespace lldb_private
1104 
1105 #endif // LLDB_TARGET_PLATFORM_H
lldb_private::Platform::GetQueueNameForThreadQAddress
virtual std::string GetQueueNameForThreadQAddress(Process *process, lldb::addr_t dispatch_qaddr)
Locate a queue name given a thread's qaddr.
Definition: Platform.h:662
lldb_private::Platform::GetRemoteSystemArchitecture
virtual ArchSpec GetRemoteSystemArchitecture()
Definition: Platform.h:252
lldb_private::ProcessInstanceInfo
Definition: ProcessInfo.h:108
lldb_private::UUID
Definition: UUID.h:23
lldb_private::Platform::GetDefaultMemoryCacheLineSize
virtual uint32_t GetDefaultMemoryCacheLineSize()
Allow the platform to set preferred memory cache line size.
Definition: Platform.h:746
lldb_private::Platform::ResolveExecutable
virtual Status ResolveExecutable(const ModuleSpec &module_spec, lldb::ModuleSP &module_sp, const FileSpecList *module_search_paths_ptr)
Find a platform plugin for a given process.
Definition: Platform.cpp:832
lldb_private::ExecutionContext
Definition: ExecutionContext.h:292
lldb-public.h
lldb_private::ArchSpec
Definition: ArchSpec.h:33
lldb_private::PlatformProperties::GetModuleCacheDirectory
FileSpec GetModuleCacheDirectory() const
Definition: Platform.cpp:109
lldb_private::MmapArgList
llvm::SmallVector< lldb::addr_t, 6 > MmapArgList
Definition: Platform.h:58
lldb_private::PlatformProperties::GetSettingName
static ConstString GetSettingName()
Definition: Platform.cpp:74
lldb_private::Platform::WriteFile
virtual uint64_t WriteFile(lldb::user_id_t fd, uint64_t offset, const void *src, uint64_t src_len, Status &error)
Definition: Platform.h:517
lldb_private::Platform::GetEnvironment
virtual Environment GetEnvironment()
Definition: Platform.cpp:1533
lldb_private::Platform::Find
static lldb::PlatformSP Find(ConstString name)
Definition: Platform.cpp:274
lldb_private::Platform::GetRemoteSharedModule
Status GetRemoteSharedModule(const ModuleSpec &module_spec, Process *process, lldb::ModuleSP &module_sp, const ModuleResolver &module_resolver, bool *did_create_ptr)
Definition: Platform.cpp:1566
lldb_private::Platform::IDToNameMap
std::map< uint32_t, ConstString > IDToNameMap
Definition: Platform.h:897
lldb_private::OptionGroupPlatformRSync
Definition: Platform.h:1027
lldb_private::OptionGroupPlatformSSH::~OptionGroupPlatformSSH
~OptionGroupPlatformSSH() override=default
lldb_private::Platform::CalculateTrapHandlerSymbolNames
virtual void CalculateTrapHandlerSymbolNames()=0
Ask the Platform subclass to fill in the list of trap handler names.
lldb_private::Platform::LoadImage
uint32_t LoadImage(lldb_private::Process *process, const lldb_private::FileSpec &local_file, const lldb_private::FileSpec &remote_file, lldb_private::Status &error)
Load a shared library into this process.
Definition: Platform.cpp:1745
lldb_private::Platform::SetLocalCacheDirectory
virtual void SetLocalCacheDirectory(const char *local)
Definition: Platform.cpp:1388
StructuredData.h
lldb_private::Platform::m_max_uid_name_len
size_t m_max_uid_name_len
Definition: Platform.h:901
lldb_private::Platform::ConnectRemote
virtual Status ConnectRemote(Args &args)
Definition: Platform.cpp:1008
lldb_private::Platform::PutFile
virtual Status PutFile(const FileSpec &source, const FileSpec &destination, uint32_t uid=UINT32_MAX, uint32_t gid=UINT32_MAX)
Definition: Platform.cpp:1248
lldb_private::OptionGroupPlatformSSH::m_ssh
bool m_ssh
Definition: Platform.h:1070
lldb_private::Platform::m_remote_url
std::string m_remote_url
Definition: Platform.h:892
lldb_private::File::OpenOptions
OpenOptions
Definition: File.h:49
lldb_private::Platform::m_sdk_build
ConstString m_sdk_build
Definition: Platform.h:889
lldb_private::Platform::UnloadImage
virtual Status UnloadImage(lldb_private::Process *process, uint32_t image_token)
Definition: Platform.cpp:1808
lldb_private::Platform::GetGlobalPlatformProperties
static PlatformProperties & GetGlobalPlatformProperties()
Definition: Platform.cpp:158
lldb_private::PluginInterface
Definition: PluginInterface.h:16
lldb_private::Platform::GetMmapArgumentList
virtual MmapArgList GetMmapArgumentList(const ArchSpec &arch, lldb::addr_t addr, lldb::addr_t length, unsigned prot, unsigned flags, lldb::addr_t fd, lldb::addr_t offset)
Definition: Platform.cpp:1330
lldb_private::Platform::ModuleIsExcludedForUnconstrainedSearches
virtual bool ModuleIsExcludedForUnconstrainedSearches(Target &target, const lldb::ModuleSP &module_sp)
Definition: Platform.h:481
lldb_private::Platform::MakeDirectory
virtual Status MakeDirectory(const FileSpec &file_spec, uint32_t permissions)
Definition: Platform.cpp:746
lldb_private::Platform::GetModuleSpec
virtual bool GetModuleSpec(const FileSpec &module_file_spec, const ArchSpec &arch, ModuleSpec &module_spec)
Definition: Platform.cpp:262
lldb_private::Platform::Install
virtual Status Install(const FileSpec &src, const FileSpec &dst)
Install a file or directory to the remote system.
Definition: Platform.cpp:620
lldb_private::Platform::GetConnectionOptions
virtual lldb_private::OptionGroupOptions * GetConnectionOptions(CommandInterpreter &interpreter)
Definition: Platform.h:599
lldb_private::Platform::DisconnectRemote
virtual Status DisconnectRemote()
Definition: Platform.cpp:1021
lldb_private::Process
Definition: Process.h:341
lldb_private::Platform::SetWorkingDirectory
bool SetWorkingDirectory(const FileSpec &working_dir)
Definition: Platform.cpp:731
lldb_private::Platform::GetRemoteOSBuildString
virtual llvm::Optional< std::string > GetRemoteOSBuildString()
Definition: Platform.h:243
lldb_private::OptionGroupOptions
Definition: Options.h:255
lldb_private::Platform::GetLocalCacheDirectory
virtual const char * GetLocalCacheDirectory()
Definition: Platform.cpp:1392
lldb_private::OptionGroup
Definition: Options.h:233
lldb_private::Platform::GetRSyncOpts
virtual const char * GetRSyncOpts()
Definition: Platform.h:574
lldb_private::OptionGroupPlatformRSync::m_rsync_prefix
std::string m_rsync_prefix
Definition: Platform.h:1045
lldb_private::Platform::GetName
ConstString GetName()
Definition: Platform.cpp:786
lldb_private::ProcessInstanceInfoMatch
Definition: ProcessInfo.h:163
lldb_private::Platform::GetMaxUserIDNameLength
size_t GetMaxUserIDNameLength() const
Definition: Platform.h:448
lldb_private::Platform::m_os_version
llvm::VersionTuple m_os_version
Definition: Platform.h:894
lldb_private::PlatformList::PlatformList
PlatformList()
Definition: Platform.h:961
lldb_private::Module
Definition: Module.h:85
lldb_private::Platform::KillProcess
virtual Status KillProcess(const lldb::pid_t pid)
Kill process on a platform.
Definition: Platform.cpp:1108
lldb_private::Platform::m_sdk_sysroot
ConstString m_sdk_sysroot
Definition: Platform.h:888
lldb_private::OptionGroupPlatformSSH::m_ssh_opts
std::string m_ssh_opts
Definition: Platform.h:1071
lldb_private::Platform::m_supports_ssh
bool m_supports_ssh
Definition: Platform.h:906
lldb_private::Platform::SetThreadCreationBreakpoint
virtual lldb::BreakpointSP SetThreadCreationBreakpoint(Target &target)
Definition: Platform.cpp:1469
lldb_private::Platform::m_trap_handlers
std::vector< ConstString > m_trap_handlers
Definition: Platform.h:910
lldb_private::Platform::~Platform
~Platform() override
The destructor is virtual since this class is designed to be inherited from by the plug-in instance.
lldb_private::OptionGroupPlatformCaching::OptionGroupPlatformCaching
OptionGroupPlatformCaching()=default
lldb_private::Stream
Definition: Stream.h:28
lldb_private::Args
Definition: Args.h:33
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
lldb_private::Platform::SetSupportsSSH
virtual void SetSupportsSSH(bool flag)
Definition: Platform.h:586
lldb_private::Platform::IsCompatibleArchitecture
virtual bool IsCompatibleArchitecture(const ArchSpec &arch, bool exact_arch_match, ArchSpec *compatible_arch_ptr)
Lets a platform answer if it is compatible with a given architecture and the target triple contained ...
Definition: Platform.cpp:1227
lldb_private::Platform::GetModuleCacheRoot
FileSpec GetModuleCacheRoot()
Definition: Platform.cpp:1726
lldb_private::Platform::GetOSKernelDescription
llvm::Optional< std::string > GetOSKernelDescription()
Definition: Platform.cpp:494
lldb_private::OptionGroupPlatformCaching
Definition: Platform.h:1079
lldb_private::Platform::DebugProcess
virtual lldb::ProcessSP DebugProcess(ProcessLaunchInfo &launch_info, Debugger &debugger, Target &target, Status &error)
Subclasses do not need to implement this function as it uses the Platform::LaunchProcess() followed b...
Definition: Platform.cpp:1120
lldb_private::Platform::SetFilePermissions
virtual Status SetFilePermissions(const FileSpec &file_spec, uint32_t file_permissions)
Definition: Platform.cpp:773
lldb_private::Target
Definition: Target.h:451
lldb_private::Platform::FetchExtendedCrashInformation
virtual llvm::Expected< StructuredData::DictionarySP > FetchExtendedCrashInformation(lldb_private::Process &process)
Gather all of crash informations into a structured data dictionary.
Definition: Platform.h:862
lldb_private::Platform::GetFilePermissions
virtual Status GetFilePermissions(const FileSpec &file_spec, uint32_t &file_permissions)
Definition: Platform.cpp:758
lldb_private::PlatformList::m_mutex
std::recursive_mutex m_mutex
Definition: Platform.h:1018
lldb_private::Platform::LoadImageUsingPaths
uint32_t LoadImageUsingPaths(lldb_private::Process *process, const lldb_private::FileSpec &library_name, const std::vector< std::string > &paths, lldb_private::Status &error, lldb_private::FileSpec *loaded_path)
Load a shared library specified by base name into this process, looking by hand along a set of paths.
Definition: Platform.cpp:1791
lldb_private::Platform::m_mutex
std::mutex m_mutex
Definition: Platform.h:900
lldb_private::Platform::GetFileWithUUID
virtual Status GetFileWithUUID(const FileSpec &platform_file, const UUID *uuid_ptr, FileSpec &local_file)
Locate a file for a platform.
Definition: Platform.cpp:174
lldb_private::Platform::GetSSHOpts
virtual const char * GetSSHOpts()
Definition: Platform.h:588
lldb_private::Platform::ReadFile
virtual uint64_t ReadFile(lldb::user_id_t fd, uint64_t offset, void *dst, uint64_t dst_len, Status &error)
Definition: Platform.h:509
lldb_private::Platform::RunShellCommand
virtual lldb_private::Status RunShellCommand(llvm::StringRef command, const FileSpec &working_dir, int *status_ptr, int *signo_ptr, std::string *command_output, const Timeout< std::micro > &timeout)
Definition: Platform.cpp:1344
lldb_private::OptionGroupPlatformRSync::~OptionGroupPlatformRSync
~OptionGroupPlatformRSync() override=default
lldb_private::Platform::SetSDKRootDirectory
void SetSDKRootDirectory(ConstString dir)
Definition: Platform.h:455
lldb_private::Properties
Definition: UserSettingsController.h:33
lldb_private::Platform::OpenFile
virtual lldb::user_id_t OpenFile(const FileSpec &file_spec, File::OpenOptions flags, uint32_t mode, Status &error)
Definition: Platform.h:494
lldb_private::PlatformList::Append
void Append(const lldb::PlatformSP &platform_sp, bool set_selected)
Definition: Platform.h:965
lldb::queue_id_t
uint64_t queue_id_t
Definition: lldb-types.h:91
lldb_private::OptionGroupPlatformSSH::SetOptionValue
lldb_private::Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value, ExecutionContext *execution_context) override
Definition: Platform.cpp:1484
lldb_private::OptionGroupPlatformSSH::GetDefinitions
llvm::ArrayRef< OptionDefinition > GetDefinitions() override
Definition: Platform.cpp:1473
lldb_private::Platform::GetSystemArchitecture
const ArchSpec & GetSystemArchitecture()
Definition: Platform.cpp:946
lldb_private::FileSpec
Definition: FileSpec.h:56
error
static llvm::raw_ostream & error(Stream &strm)
Definition: CommandReturnObject.cpp:17
lldb_private::Platform::GetHostPlatform
static lldb::PlatformSP GetHostPlatform()
Get the native host platform plug-in.
Definition: Platform.cpp:135
Options.h
lldb_private::OptionGroupPlatformRSync::m_rsync
bool m_rsync
Definition: Platform.h:1043
lldb_private::PlatformList::GetSelectedPlatform
lldb::PlatformSP GetSelectedPlatform()
Select the active platform.
Definition: Platform.h:993
lldb_private::Platform::m_is_host
bool m_is_host
Definition: Platform.h:879
lldb_private::OptionGroupPlatformSSH::OptionGroupPlatformSSH
OptionGroupPlatformSSH()=default
lldb_private::OptionGroupPlatformCaching::GetDefinitions
llvm::ArrayRef< OptionDefinition > GetDefinitions() override
Definition: Platform.cpp:1506
lldb_private::Platform::m_local_cache_directory
std::string m_local_cache_directory
Definition: Platform.h:909
lldb-private-forward.h
lldb_private::BreakpointSite
Definition: BreakpointSite.h:35
lldb_private::Platform::m_rsync_prefix
std::string m_rsync_prefix
Definition: Platform.h:905
lldb_private::Platform::m_supports_rsync
bool m_supports_rsync
Definition: Platform.h:903
lldb_private::ProcessLaunchInfo
Definition: ProcessLaunchInfo.h:31
lldb_private::Platform::GetResumeCountForLaunchInfo
virtual uint32_t GetResumeCountForLaunchInfo(ProcessLaunchInfo &launch_info)
Definition: Platform.h:634
lldb_private::Platform::GetRemoteOSKernelDescription
virtual llvm::Optional< std::string > GetRemoteOSKernelDescription()
Definition: Platform.h:247
lldb_private::Platform::SetHostPlatform
static void SetHostPlatform(const lldb::PlatformSP &platform_sp)
Definition: Platform.cpp:163
lldb_private::OptionGroupPlatformCaching::~OptionGroupPlatformCaching
~OptionGroupPlatformCaching() override=default
lldb_private::Platform::AddClangModuleCompilationOptions
virtual void AddClangModuleCompilationOptions(Target *target, std::vector< std::string > &options)
Definition: Platform.cpp:500
lldb_private::Platform::GetRemoteWorkingDirectory
virtual FileSpec GetRemoteWorkingDirectory()
Definition: Platform.h:256
lldb_private::Platform::GetSharedModule
virtual Status GetSharedModule(const ModuleSpec &module_spec, Process *process, lldb::ModuleSP &module_sp, const FileSpecList *module_search_paths_ptr, llvm::SmallVectorImpl< lldb::ModuleSP > *old_modules, bool *did_create_ptr)
Definition: Platform.cpp:221
lldb_private::Platform::m_rsync_opts
std::string m_rsync_opts
Definition: Platform.h:904
lldb_private::Platform::CreateSymlink
virtual Status CreateSymlink(const FileSpec &src, const FileSpec &dst)
Definition: Platform.cpp:1314
lldb_private::OptionGroupPlatformRSync::GetDefinitions
llvm::ArrayRef< OptionDefinition > GetDefinitions() override
Definition: Platform.cpp:1425
lldb_private::Platform::GetOSBuildString
llvm::Optional< std::string > GetOSBuildString()
Definition: Platform.cpp:488
lldb_private::Platform::GetTrapHandlerUnwindPlan
virtual lldb::UnwindPlanSP GetTrapHandlerUnwindPlan(const llvm::Triple &triple, ConstString name)
Try to get a specific unwind plan for a named trap handler.
Definition: Platform.h:724
lldb_private::OptionGroupPlatformSSH
Definition: Platform.h:1054
lldb_private::Platform::ConnectToWaitingProcesses
virtual size_t ConnectToWaitingProcesses(lldb_private::Debugger &debugger, lldb_private::Status &error)
Connect to all processes waiting for a debugger to attach.
Definition: Platform.cpp:1888
lldb_private::PlatformList::GetSize
size_t GetSize()
Definition: Platform.h:972
lldb_private::Platform::SetRemoteWorkingDirectory
virtual bool SetRemoteWorkingDirectory(const FileSpec &working_dir)
Definition: Platform.cpp:801
lldb_private::Platform::GetSDKDirectory
virtual lldb_private::ConstString GetSDKDirectory(lldb_private::Target &target)
Definition: Platform.h:417
lldb_private::PlatformList::m_platforms
collection m_platforms
Definition: Platform.h:1019
lldb_private::OptionGroupPlatformCaching::OptionParsingStarting
void OptionParsingStarting(ExecutionContext *execution_context) override
Definition: Platform.cpp:1510
lldb_private::Platform::CanDebugProcess
virtual bool CanDebugProcess()
Not all platforms will support debugging a process by spawning somehow halted for a debugger (specifi...
Definition: Platform.h:342
lldb_private::Platform::SetSSHOpts
virtual void SetSSHOpts(const char *opts)
Definition: Platform.h:590
lldb_private::OptionGroupPlatformCaching::operator=
const OptionGroupPlatformCaching & operator=(const OptionGroupPlatformCaching &)=delete
lldb_private::ConstString
Definition: ConstString.h:40
lldb_private::Platform::GetSoftwareBreakpointTrapOpcode
virtual size_t GetSoftwareBreakpointTrapOpcode(Target &target, BreakpointSite *bp_site)
Definition: Platform.cpp:1894
lldb_private::Platform::m_ignores_remote_hostname
bool m_ignores_remote_hostname
Definition: Platform.h:908
lldb_private::Platform::GetPlatformSpecificConnectionInformation
virtual std::string GetPlatformSpecificConnectionInformation()
Definition: Platform.h:629
lldb_private::Platform::CalculateMD5
virtual bool CalculateMD5(const FileSpec &file_spec, uint64_t &low, uint64_t &high)
Definition: Platform.cpp:1377
lldb_private::Platform::GetSupportsRSync
virtual bool GetSupportsRSync()
Definition: Platform.h:570
lldb_private::PlatformProperties::SetModuleCacheDirectory
bool SetModuleCacheDirectory(const FileSpec &dir_spec)
Definition: Platform.cpp:114
lldb_private::OptionGroupPlatformSSH::operator=
const OptionGroupPlatformSSH & operator=(const OptionGroupPlatformSSH &)=delete
lldb_private::Platform::GetUserIDResolver
virtual UserIDResolver & GetUserIDResolver()=0
lldb_private::Platform::Terminate
static void Terminate()
Definition: Platform.cpp:149
lldb_private::Platform::m_working_dir
FileSpec m_working_dir
Definition: Platform.h:890
PluginInterface.h
lldb_private::OptionGroupPlatformCaching::m_cache_dir
std::string m_cache_dir
Definition: Platform.h:1095
lldb_private::OptionGroupPlatformRSync::SetOptionValue
lldb_private::Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value, ExecutionContext *execution_context) override
Definition: Platform.cpp:1438
lldb_private::Platform::GetCachedSharedModule
bool GetCachedSharedModule(const ModuleSpec &module_spec, lldb::ModuleSP &module_sp, bool *did_create_ptr)
Definition: Platform.cpp:1639
lldb_private::OptionGroupPlatformRSync::OptionParsingStarting
void OptionParsingStarting(ExecutionContext *execution_context) override
Definition: Platform.cpp:1429
lldb_private::CommandInterpreter
Definition: CommandInterpreter.h:214
lldb_private::Platform::GetRemoteURL
const std::string & GetRemoteURL() const
Definition: Platform.h:421
lldb_private::Platform::GetSupportsSSH
virtual bool GetSupportsSSH()
Definition: Platform.h:584
lldb_private::Platform::AutoCompleteDiskFileOrDirectory
virtual void AutoCompleteDiskFileOrDirectory(CompletionRequest &request, bool only_dir)
Definition: Platform.h:506
lldb_private::Debugger
Definition: Debugger.h:70
lldb_private::PlatformList::m_selected_platform_sp
lldb::PlatformSP m_selected_platform_sp
Definition: Platform.h:1020
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
lldb_private::PlatformList
Definition: Platform.h:959
lldb_private::ArchSpec::IsValid
bool IsValid() const
Tests if this ArchSpec is valid.
Definition: ArchSpec.h:342
lldb_private::Platform::DownloadSymbolFile
virtual Status DownloadSymbolFile(const lldb::ModuleSP &module_sp, const FileSpec &dst_file_spec)
Definition: Platform.cpp:1720
lldb_private::Platform::Initialize
static void Initialize()
Definition: Platform.cpp:147
LLDB_INVALID_QUEUE_ID
#define LLDB_INVALID_QUEUE_ID
Definition: lldb-defines.h:100
lldb_private::OptionGroupPlatformCaching::SetOptionValue
lldb_private::Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value, ExecutionContext *execution_context) override
Definition: Platform.cpp:1515
lldb_private::Platform::GetRemoteUnixSignals
virtual const lldb::UnixSignalsSP & GetRemoteUnixSignals()
Definition: Platform.cpp:1734
lldb_private::Platform::SetSDKBuild
void SetSDKBuild(ConstString sdk_build)
Definition: Platform.h:459
lldb_private::OptionGroupPlatformRSync::m_rsync_opts
std::string m_rsync_opts
Definition: Platform.h:1044
lldb_private::Platform::GetFileSize
virtual lldb::user_id_t GetFileSize(const FileSpec &file_spec)
Definition: Platform.h:502
lldb_private::Platform::LocateExecutable
virtual FileSpec LocateExecutable(const char *basename)
Find a support executable that may not live within in the standard locations related to LLDB.
Definition: Platform.h:741
lldb_private::ProcessAttachInfo
Definition: Process.h:113
lldb_private::Platform::SetSupportsRSync
virtual void SetSupportsRSync(bool flag)
Definition: Platform.h:572
lldb_private::Platform::GetIgnoresRemoteHostname
virtual bool GetIgnoresRemoteHostname()
Definition: Platform.h:592
lldb_private::Platform::IsRemote
bool IsRemote() const
Definition: Platform.h:427
UserIDResolver.h
lldb_private::Platform::GetSDKBuild
ConstString GetSDKBuild() const
Definition: Platform.h:457
lldb_private::Platform::ModuleResolver
std::function< Status(const ModuleSpec &)> ModuleResolver
Definition: Platform.h:946
lldb_private::UserIDResolver
An abstract interface for things that know how to map numeric user/group IDs into names.
Definition: UserIDResolver.h:22
lldb_private::Platform::m_max_gid_name_len
size_t m_max_gid_name_len
Definition: Platform.h:902
lldb_private::ModuleSpec
Definition: ModuleSpec.h:26
lldb_private::Platform::GetUnixSignals
lldb::UnixSignalsSP GetUnixSignals()
Definition: Platform.cpp:1739
lldb_private::Platform::GetOSVersion
virtual llvm::VersionTuple GetOSVersion(Process *process=nullptr)
Get the OS version from a connected platform.
Definition: Platform.cpp:446
lldb_private::PlatformList::SetSelectedPlatform
void SetSelectedPlatform(const lldb::PlatformSP &platform_sp)
Definition: Platform.h:1001
lldb_private::Status
Definition: Status.h:44
lldb_private::Platform::m_os_version_set_while_connected
bool m_os_version_set_while_connected
Definition: Platform.h:885
lldb_private::Platform::SetSystemArchitecture
void SetSystemArchitecture(const ArchSpec &arch)
Definition: Platform.h:436
lldb_private::PlatformProperties::PlatformProperties
PlatformProperties()
Definition: Platform.cpp:79
lldb_private::Timeout< std::micro >
lldb_private::Platform::GetPlatformForArchitecture
static lldb::PlatformSP GetPlatformForArchitecture(const ArchSpec &arch, ArchSpec *platform_arch_ptr)
Definition: Platform.cpp:1203
lldb_private::Platform::Platform
Platform(bool is_host_platform)
Default Constructor.
Definition: Platform.cpp:385
lldb_private::Platform::GetWorkingDirectory
FileSpec GetWorkingDirectory()
Definition: Platform.cpp:509
lldb_private::Platform::GetCacheHostname
virtual const char * GetCacheHostname()
Definition: Platform.cpp:1732
lldb_private::Platform::m_calculated_trap_handlers
bool m_calculated_trap_handlers
Definition: Platform.h:911
lldb_private::Platform::SetRSyncOpts
virtual void SetRSyncOpts(const char *opts)
Definition: Platform.h:576
uint32_t
UserSettingsController.h
lldb_private::Platform::SetRSyncPrefix
virtual void SetRSyncPrefix(const char *prefix)
Definition: Platform.h:580
lldb_private::Platform::GetAugmentedArchSpec
static ArchSpec GetAugmentedArchSpec(Platform *platform, llvm::StringRef triple)
Augments the triple either with information from platform or the host system (if platform is null).
Definition: Platform.cpp:378
lldb::pid_t
uint64_t pid_t
Definition: lldb-types.h:85
lldb_private::Platform::GetCachedExecutable
Status GetCachedExecutable(ModuleSpec &module_spec, lldb::ModuleSP &module_sp, const FileSpecList *module_search_paths_ptr)
Definition: Platform.cpp:1547
lldb_private::OptionGroupPlatformRSync::m_ignores_remote_hostname
bool m_ignores_remote_hostname
Definition: Platform.h:1046
lldb_private::Platform::LocateExecutableScriptingResources
virtual FileSpecList LocateExecutableScriptingResources(Target *target, Module &module, Stream *feedback_stream)
Definition: Platform.cpp:182
lldb_private::PlatformProperties
Definition: Platform.h:42
lldb_private::Platform::GetRSyncPrefix
virtual const char * GetRSyncPrefix()
Definition: Platform.h:578
lldb_private::Platform::m_name
std::string m_name
Definition: Platform.h:893
ArchSpec.h
UINT32_MAX
#define UINT32_MAX
Definition: lldb-defines.h:31
lldb_private::Environment
Definition: Environment.h:18
Timeout.h
lldb_private::Platform::GetTrapHandlerSymbolNames
virtual const std::vector< ConstString > & GetTrapHandlerSymbolNames()
Provide a list of trap handler function names for this platform.
Definition: Platform.cpp:1535
lldb_private::Platform::ResolveSymbolFile
virtual Status ResolveSymbolFile(Target &target, const ModuleSpec &sym_spec, FileSpec &sym_file)
Find a symbol file given a symbol file module specification.
Definition: Platform.cpp:929
lldb_private::Platform::DoLoadImage
virtual uint32_t DoLoadImage(lldb_private::Process *process, const lldb_private::FileSpec &remote_file, const std::vector< std::string > *paths, lldb_private::Status &error, lldb_private::FileSpec *loaded_path=nullptr)
Definition: Platform.cpp:1782
lldb_private::Platform::FindProcesses
virtual uint32_t FindProcesses(const ProcessInstanceInfoMatch &match_info, ProcessInstanceInfoList &proc_infos)
Attach to an existing process by process name.
Definition: Platform.cpp:1044
lldb_private::Platform
Definition: Platform.h:71
lldb_private::Platform::GetFullNameForDylib
virtual ConstString GetFullNameForDylib(ConstString basename)
Definition: Platform.cpp:797
lldb_private::Platform::m_module_cache
const std::unique_ptr< ModuleCache > m_module_cache
Definition: Platform.h:912
lldb_private::Platform::GetSDKRootDirectory
ConstString GetSDKRootDirectory() const
Definition: Platform.h:453
lldb_private::PlatformProperties::GetUseModuleCache
bool GetUseModuleCache() const
Definition: Platform.cpp:98
lldb_private::Platform::IsConnected
virtual bool IsConnected() const
Definition: Platform.h:429
lldb_private::Platform::ShellExpandArguments
virtual Status ShellExpandArguments(ProcessLaunchInfo &launch_info)
Perform expansion of the command-line for this launch info This can potentially involve wildcard expa...
Definition: Platform.cpp:1102
lldb_private::Platform::GetProcessInfo
virtual bool GetProcessInfo(lldb::pid_t pid, ProcessInstanceInfo &proc_info)
Definition: Platform.cpp:1035
lldb_private::OptionGroupPlatformSSH::OptionParsingStarting
void OptionParsingStarting(ExecutionContext *execution_context) override
Definition: Platform.cpp:1477
lldb_private::PlatformProperties::SetDefaultModuleCacheDirectory
void SetDefaultModuleCacheDirectory(const FileSpec &dir_spec)
Definition: Platform.cpp:119
lldb::user_id_t
uint64_t user_id_t
Definition: lldb-types.h:84
lldb_private::Platform::CreateArchList
static std::vector< ArchSpec > CreateArchList(llvm::ArrayRef< llvm::Triple::ArchType > archs, llvm::Triple::OSType os)
Create a list of ArchSpecs with the given OS and a architectures.
Definition: Platform.cpp:1213
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::Platform::ResolveRemotePath
virtual bool ResolveRemotePath(const FileSpec &platform_path, FileSpec &resolved_platform_path)
Resolves the FileSpec to a (possibly) remote path.
Definition: Platform.cpp:939
lldb_private::Platform::GetFileExists
virtual bool GetFileExists(const lldb_private::FileSpec &file_spec)
Definition: Platform.cpp:1321
lldb_private::PlatformList::collection
std::vector< lldb::PlatformSP > collection
Definition: Platform.h:1017
lldb_private::eMmapFlagsAnon
@ eMmapFlagsAnon
Definition: Platform.h:40
lldb_private::MmapFlags
MmapFlags
Definition: Platform.h:40
lldb_private::Platform::Attach
virtual lldb::ProcessSP Attach(ProcessAttachInfo &attach_info, Debugger &debugger, Target *target, Status &error)=0
Attach to an existing process using a process ID.
FileSpec.h
lldb_private::Platform::LaunchProcess
virtual Status LaunchProcess(ProcessLaunchInfo &launch_info)
Launch a new process on a platform, not necessarily for debugging, it could be just for running the p...
Definition: Platform.cpp:1054
lldb_private::Platform::ResolveRemoteExecutable
virtual Status ResolveRemoteExecutable(const ModuleSpec &module_spec, lldb::ModuleSP &exe_module_sp, const FileSpecList *module_search_paths_ptr)
Definition: Platform.cpp:865
lldb_private::Platform::SetOSVersion
bool SetOSVersion(llvm::VersionTuple os_version)
Definition: Platform.cpp:809
lldb_private::Platform::CloseFile
virtual bool CloseFile(lldb::user_id_t fd, Status &error)
Definition: Platform.h:500
lldb_private::Platform::m_ssh_opts
std::string m_ssh_opts
Definition: Platform.h:907
ConstString.h
lldb_private::Platform::m_system_arch
ArchSpec m_system_arch
Definition: Platform.h:896
lldb_private::OptionGroupPlatformRSync::OptionGroupPlatformRSync
OptionGroupPlatformRSync()=default
lldb_private::Platform::GetStatus
virtual void GetStatus(Stream &strm)
Report the current status for this platform.
Definition: Platform.cpp:400
lldb_private::Platform::Unlink
virtual Status Unlink(const FileSpec &file_spec)
Definition: Platform.cpp:1325
lldb_private::Platform::DownloadModuleSlice
virtual Status DownloadModuleSlice(const FileSpec &src_file_spec, const uint64_t src_offset, const uint64_t src_size, const FileSpec &dst_file_spec)
Definition: Platform.cpp:1672
lldb_private::Platform::GetDescription
virtual llvm::StringRef GetDescription()=0
lldb_private::Platform::GetMaxGroupIDNameLength
size_t GetMaxGroupIDNameLength() const
Definition: Platform.h:451
llvm::SmallVectorImpl
Definition: Disassembler.h:42
lldb_private::Platform::GetRemoteOSVersion
virtual bool GetRemoteOSVersion()
Definition: Platform.h:241
lldb_private::Platform::IsHost
bool IsHost() const
Definition: Platform.h:423
lldb_private::Platform::SetIgnoresRemoteHostname
virtual void SetIgnoresRemoteHostname(bool flag)
Definition: Platform.h:594
lldb_private::Platform::GetSupportedArchitectures
virtual std::vector< ArchSpec > GetSupportedArchitectures()=0
Get the platform's supported architectures in the order in which they should be searched.
lldb_private::eMmapFlagsPrivate
@ eMmapFlagsPrivate
Definition: Platform.h:40
lldb_private::Platform::GetQueueIDForThreadQAddress
virtual lldb::queue_id_t GetQueueIDForThreadQAddress(Process *process, lldb::addr_t dispatch_qaddr)
Locate a queue ID given a thread's qaddr.
Definition: Platform.h:685
lldb_private::PlatformProperties::SetUseModuleCache
bool SetUseModuleCache(bool use_module_cache)
Definition: Platform.cpp:104
lldb_private::ProcessInstanceInfoList
std::vector< ProcessInstanceInfo > ProcessInstanceInfoList
Definition: Host.h:30
lldb_private::Platform::GetHostPlatformName
static const char * GetHostPlatformName()
Definition: Platform.cpp:60
File.h
lldb_private::Platform::m_system_arch_set_while_connected
bool m_system_arch_set_while_connected
Definition: Platform.h:886
lldb_private::PlatformList::~PlatformList
~PlatformList()=default
lldb_private::Platform::ConnectProcess
virtual lldb::ProcessSP ConnectProcess(llvm::StringRef connect_url, llvm::StringRef plugin_name, Debugger &debugger, Target *target, Status &error)
Definition: Platform.cpp:1813
lldb_private::Platform::GetFile
virtual Status GetFile(const FileSpec &source, const FileSpec &destination)
Definition: Platform.cpp:1308
lldb_private::Platform::ConnectProcessSynchronous
virtual lldb::ProcessSP ConnectProcessSynchronous(llvm::StringRef connect_url, llvm::StringRef plugin_name, Debugger &debugger, Stream &stream, Target *target, Status &error)
Definition: Platform.cpp:1821
UINT64_MAX
#define UINT64_MAX
Definition: lldb-defines.h:35
lldb_private::Platform::GetHostname
virtual const char * GetHostname()
Definition: Platform.cpp:788
lldb_private::OptionGroupPlatformRSync::operator=
const OptionGroupPlatformRSync & operator=(const OptionGroupPlatformRSync &)=delete
lldb_private::PlatformList::GetAtIndex
lldb::PlatformSP GetAtIndex(uint32_t idx)
Definition: Platform.h:977
lldb_private::CompletionRequest
Definition: CompletionRequest.h:100
lldb_private::Platform::DoConnectProcess
lldb::ProcessSP DoConnectProcess(llvm::StringRef connect_url, llvm::StringRef plugin_name, Debugger &debugger, Stream *stream, Target *target, Status &error)
Private implementation of connecting to a process.
Definition: Platform.cpp:1828
lldb_private::PlatformList::operator=
const PlatformList & operator=(const PlatformList &)=delete
lldb_private::Platform::Create
static lldb::PlatformSP Create(ConstString name, Status &error)
Definition: Platform.cpp:289
lldb_private::Platform::SupportsModules
virtual bool SupportsModules()
Definition: Platform.h:464