1 //===-- Platform.h ----------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_Platform_h_
11 #define liblldb_Platform_h_
19 // Other libraries and framework includes
21 #include "lldb/lldb-public.h"
22 #include "lldb/Core/ArchSpec.h"
23 #include "lldb/Core/ConstString.h"
24 #include "lldb/Core/PluginInterface.h"
25 #include "lldb/Interpreter/Options.h"
26 #include "lldb/Host/Mutex.h"
28 namespace lldb_private {
30 //----------------------------------------------------------------------
31 /// @class Platform Platform.h "lldb/Target/Platform.h"
32 /// @brief A plug-in interface definition class for debug platform that
33 /// includes many platform abilities such as:
34 /// @li getting platform information such as supported architectures,
35 /// supported binary file formats and more
36 /// @li launching new processes
37 /// @li attaching to existing processes
38 /// @li download/upload files
39 /// @li execute shell commands
40 /// @li listing and getting info for existing processes
41 /// @li attaching and possibly debugging the platform's kernel
42 //----------------------------------------------------------------------
43 class Platform : public PluginInterface
47 //------------------------------------------------------------------
48 /// Get the native host platform plug-in.
50 /// There should only be one of these for each host that LLDB runs
51 /// upon that should be statically compiled in and registered using
52 /// preprocessor macros or other similar build mechanisms in a
53 /// PlatformSubclass::Initialize() function.
55 /// This platform will be used as the default platform when launching
56 /// or attaching to processes unless another platform is specified.
57 //------------------------------------------------------------------
58 static lldb::PlatformSP
59 GetDefaultPlatform ();
61 static lldb::PlatformSP
62 GetPlatformForArchitecture (const ArchSpec &arch,
63 ArchSpec *platform_arch_ptr);
66 GetHostPlatformName ();
69 SetDefaultPlatform (const lldb::PlatformSP &platform_sp);
71 static lldb::PlatformSP
72 Create (const char *platform_name, Error &error);
74 static lldb::PlatformSP
75 Create (const ArchSpec &arch, ArchSpec *platform_arch_ptr, Error &error);
78 GetNumConnectedRemotePlatforms ();
80 static lldb::PlatformSP
81 GetConnectedRemotePlatformAtIndex (uint32_t idx);
83 //------------------------------------------------------------------
84 /// Default Constructor
85 //------------------------------------------------------------------
86 Platform (bool is_host_platform);
88 //------------------------------------------------------------------
91 /// The destructor is virtual since this class is designed to be
92 /// inherited from by the plug-in instance.
93 //------------------------------------------------------------------
97 //------------------------------------------------------------------
98 /// Find a platform plugin for a given process.
100 /// Scans the installed Platform plug-ins and tries to find
101 /// an instance that can be used for \a process
103 /// @param[in] process
104 /// The process for which to try and locate a platform
105 /// plug-in instance.
107 /// @param[in] plugin_name
108 /// An optional name of a specific platform plug-in that
109 /// should be used. If NULL, pick the best plug-in.
110 //------------------------------------------------------------------
112 FindPlugin (Process *process, const ConstString &plugin_name);
114 //------------------------------------------------------------------
115 /// Set the target's executable based off of the existing
116 /// architecture information in \a target given a path to an
117 /// executable \a exe_file.
119 /// Each platform knows the architectures that it supports and can
120 /// select the correct architecture slice within \a exe_file by
121 /// inspecting the architecture in \a target. If the target had an
122 /// architecture specified, then in can try and obey that request
123 /// and optionally fail if the architecture doesn't match up.
124 /// If no architecture is specified, the platform should select the
125 /// default architecture from \a exe_file. Any application bundles
126 /// or executable wrappers can also be inspected for the actual
127 /// application binary within the bundle that should be used.
130 /// Returns \b true if this Platform plug-in was able to find
131 /// a suitable executable, \b false otherwise.
132 //------------------------------------------------------------------
134 ResolveExecutable (const FileSpec &exe_file,
135 const ArchSpec &arch,
136 lldb::ModuleSP &module_sp,
137 const FileSpecList *module_search_paths_ptr);
140 //------------------------------------------------------------------
141 /// Find a symbol file given a symbol file module specification.
143 /// Each platform might have tricks to find symbol files for an
144 /// executable given information in a symbol file ModuleSpec. Some
145 /// platforms might also support symbol files that are bundles and
146 /// know how to extract the right symbol file given a bundle.
148 /// @param[in] target
149 /// The target in which we are trying to resolve the symbol file.
150 /// The target has a list of modules that we might be able to
151 /// use in order to help find the right symbol file. If the
152 /// "m_file" or "m_platform_file" entries in the \a sym_spec
153 /// are filled in, then we might be able to locate a module in
154 /// the target, extract its UUID and locate a symbol file.
155 /// If just the "m_uuid" is specified, then we might be able
156 /// to find the module in the target that matches that UUID
157 /// and pair the symbol file along with it. If just "m_symbol_file"
158 /// is specified, we can use a variety of tricks to locate the
159 /// symbols in an SDK, PDK, or other development kit location.
161 /// @param[in] sym_spec
162 /// A module spec that describes some information about the
163 /// symbol file we are trying to resolve. The ModuleSpec might
164 /// contain the following:
165 /// m_file - A full or partial path to an executable from the
166 /// target (might be empty).
167 /// m_platform_file - Another executable hint that contains
168 /// the path to the file as known on the
169 /// local/remote platform.
170 /// m_symbol_file - A full or partial path to a symbol file
171 /// or symbol bundle that should be used when
172 /// trying to resolve the symbol file.
173 /// m_arch - The architecture we are looking for when resolving
175 /// m_uuid - The UUID of the executable and symbol file. This
176 /// can often be used to match up an exectuable with
177 /// a symbol file, or resolve an symbol file in a
178 /// symbol file bundle.
180 /// @param[out] sym_file
181 /// The resolved symbol file spec if the returned error
182 /// indicates succes.
185 /// Returns an error that describes success or failure.
186 //------------------------------------------------------------------
188 ResolveSymbolFile (Target &target,
189 const ModuleSpec &sym_spec,
192 //------------------------------------------------------------------
193 /// Resolves the FileSpec to a (possibly) remote path. Remote
194 /// platforms must override this to resolve to a path on the remote
196 //------------------------------------------------------------------
198 ResolveRemotePath (const FileSpec &platform_path,
199 FileSpec &resolved_platform_path);
202 GetOSVersion (uint32_t &major,
207 SetOSVersion (uint32_t major,
212 GetOSBuildString (std::string &s);
215 GetOSKernelDescription (std::string &s);
217 // Returns the the hostname if we are connected, else the short plugin
226 GetDescription () = 0;
228 //------------------------------------------------------------------
229 /// Report the current status for this platform.
231 /// The returned string usually involves returning the OS version
232 /// (if available), and any SDK directory that might be being used
233 /// for local file caching, and if connected a quick blurb about
234 /// what this platform is connected to.
235 //------------------------------------------------------------------
237 GetStatus (Stream &strm);
239 //------------------------------------------------------------------
240 // Subclasses must be able to fetch the current OS version
242 // Remote classes must be connected for this to succeed. Local
243 // subclasses don't need to override this function as it will just
244 // call the Host::GetOSVersion().
245 //------------------------------------------------------------------
247 GetRemoteOSVersion ()
253 GetRemoteOSBuildString (std::string &s)
260 GetRemoteOSKernelDescription (std::string &s)
266 // Remote Platform subclasses need to override this function
268 GetRemoteSystemArchitecture ()
270 return ArchSpec(); // Return an invalid architecture
274 GetUserName (uint32_t uid);
277 GetGroupName (uint32_t gid);
279 //------------------------------------------------------------------
280 /// Locate a file for a platform.
282 /// The default implementation of this function will return the same
283 /// file patch in \a local_file as was in \a platform_file.
285 /// @param[in] platform_file
286 /// The platform file path to locate and cache locally.
288 /// @param[in] uuid_ptr
289 /// If we know the exact UUID of the file we are looking for, it
290 /// can be specified. If it is not specified, we might now know
291 /// the exact file. The UUID is usually some sort of MD5 checksum
292 /// for the file and is sometimes known by dynamic linkers/loaders.
293 /// If the UUID is known, it is best to supply it to platform
294 /// file queries to ensure we are finding the correct file, not
295 /// just a file at the correct path.
297 /// @param[out] local_file
298 /// A locally cached version of the platform file. For platforms
299 /// that describe the current host computer, this will just be
300 /// the same file. For remote platforms, this file might come from
301 /// and SDK directory, or might need to be sync'ed over to the
302 /// current machine for efficient debugging access.
306 //------------------------------------------------------------------
308 GetFile (const FileSpec &platform_file,
309 const UUID *uuid_ptr,
310 FileSpec &local_file);
312 //----------------------------------------------------------------------
313 // Locate the scripting resource given a module specification.
315 // Locating the file should happen only on the local computer or using
316 // the current computers global settings.
317 //----------------------------------------------------------------------
319 LocateExecutableScriptingResources (Target *target,
323 GetSharedModule (const ModuleSpec &module_spec,
324 lldb::ModuleSP &module_sp,
325 const FileSpecList *module_search_paths_ptr,
326 lldb::ModuleSP *old_module_sp_ptr,
327 bool *did_create_ptr);
330 ConnectRemote (Args& args);
335 //------------------------------------------------------------------
336 /// Get the platform's supported architectures in the order in which
337 /// they should be searched.
340 /// A zero based architecture index
343 /// A copy of the archgitecture at index if the return value is
347 /// \b true if \a arch was filled in and is valid, \b false
349 //------------------------------------------------------------------
351 GetSupportedArchitectureAtIndex (uint32_t idx, ArchSpec &arch) = 0;
354 GetSoftwareBreakpointTrapOpcode (Target &target,
355 BreakpointSite *bp_site) = 0;
357 //------------------------------------------------------------------
358 /// Launch a new process on a platform, not necessarily for
359 /// debugging, it could be just for running the process.
360 //------------------------------------------------------------------
362 LaunchProcess (ProcessLaunchInfo &launch_info);
364 //------------------------------------------------------------------
365 /// Lets a platform answer if it is compatible with a given
366 /// architecture and the target triple contained within.
367 //------------------------------------------------------------------
369 IsCompatibleArchitecture (const ArchSpec &arch,
370 bool exact_arch_match,
371 ArchSpec *compatible_arch_ptr);
373 //------------------------------------------------------------------
374 /// Not all platforms will support debugging a process by spawning
375 /// somehow halted for a debugger (specified using the
376 /// "eLaunchFlagDebug" launch flag) and then attaching. If your
377 /// platform doesn't support this, override this function and return
379 //------------------------------------------------------------------
386 //------------------------------------------------------------------
387 /// Subclasses should NOT need to implement this function as it uses
388 /// the Platform::LaunchProcess() followed by Platform::Attach ()
389 //------------------------------------------------------------------
391 DebugProcess (ProcessLaunchInfo &launch_info,
393 Target *target, // Can be NULL, if NULL create a new target, else use existing one
397 //------------------------------------------------------------------
398 /// Attach to an existing process using a process ID.
400 /// Each platform subclass needs to implement this function and
401 /// attempt to attach to the process with the process ID of \a pid.
402 /// The platform subclass should return an appropriate ProcessSP
403 /// subclass that is attached to the process, or an empty shared
404 /// pointer with an appriopriate error.
407 /// The process ID that we should attempt to attach to.
410 /// An appropriate ProcessSP containing a valid shared pointer
411 /// to the default Process subclass for the platform that is
412 /// attached to the process, or an empty shared pointer with an
413 /// appriopriate error fill into the \a error object.
414 //------------------------------------------------------------------
415 virtual lldb::ProcessSP
416 Attach (ProcessAttachInfo &attach_info,
418 Target *target, // Can be NULL, if NULL create a new target, else use existing one
422 //------------------------------------------------------------------
423 /// Attach to an existing process by process name.
425 /// This function is not meant to be overridden by Process
426 /// subclasses. It will first call
427 /// Process::WillAttach (const char *) and if that returns \b
428 /// true, Process::DoAttach (const char *) will be called to
429 /// actually do the attach. If DoAttach returns \b true, then
430 /// Process::DidAttach() will be called.
432 /// @param[in] process_name
433 /// A process name to match against the current process list.
436 /// Returns \a pid if attaching was successful, or
437 /// LLDB_INVALID_PROCESS_ID if attaching fails.
438 //------------------------------------------------------------------
439 // virtual lldb::ProcessSP
440 // Attach (const char *process_name,
441 // bool wait_for_launch,
442 // Error &error) = 0;
444 //------------------------------------------------------------------
445 // The base class Platform will take care of the host platform.
446 // Subclasses will need to fill in the remote case.
447 //------------------------------------------------------------------
449 FindProcesses (const ProcessInstanceInfoMatch &match_info,
450 ProcessInstanceInfoList &proc_infos);
453 GetProcessInfo (lldb::pid_t pid, ProcessInstanceInfo &proc_info);
455 //------------------------------------------------------------------
456 // Set a breakpoint on all functions that can end up creating a thread
457 // for this platform. This is needed when running expressions and
458 // also for process control.
459 //------------------------------------------------------------------
460 virtual lldb::BreakpointSP
461 SetThreadCreationBreakpoint (Target &target);
463 //------------------------------------------------------------------
464 // Given a target, find the local SDK directory if one exists on the
466 //------------------------------------------------------------------
467 virtual lldb_private::ConstString
468 GetSDKDirectory (lldb_private::Target &target)
470 return lldb_private::ConstString();
474 GetRemoteURL () const
482 return m_is_host; // Is this the default host platform?
494 // Remote subclasses should override this function
499 GetSystemArchitecture();
502 SetSystemArchitecture (const ArchSpec &arch)
504 m_system_arch = arch;
506 m_os_version_set_while_connected = m_system_arch.IsValid();
509 // Used for column widths
511 GetMaxUserIDNameLength() const
513 return m_max_uid_name_len;
515 // Used for column widths
517 GetMaxGroupIDNameLength() const
519 return m_max_gid_name_len;
523 GetSDKRootDirectory () const
525 return m_sdk_sysroot;
529 SetSDKRootDirectory (const ConstString &dir)
541 SetSDKBuild (const ConstString &sdk_build)
543 m_sdk_build = sdk_build;
546 // There may be modules that we don't want to find by default for operations like "setting breakpoint by name".
547 // The platform will return "true" from this call if the passed in module happens to be one of these.
550 ModuleIsExcludedForNonModuleSpecificSearches (Target &target, const lldb::ModuleSP &module_sp)
556 MakeDirectory (const std::string &path,
562 // this need not be virtual: the core behavior is in
563 // MakeDirectory(std::string,mode_t)
565 MakeDirectory (const FileSpec &spec,
568 virtual lldb::user_id_t
569 OpenFile (const FileSpec& file_spec,
578 CloseFile (lldb::user_id_t fd,
584 virtual lldb::user_id_t
585 GetFileSize (const FileSpec& file_spec)
591 ReadFile (lldb::user_id_t fd,
597 error.SetErrorStringWithFormat ("Platform::ReadFile() is not supported in the %s platform", GetName().GetCString());
602 WriteFile (lldb::user_id_t fd,
608 error.SetErrorStringWithFormat ("Platform::ReadFile() is not supported in the %s platform", GetName().GetCString());
613 PutFile (const FileSpec& source,
614 const FileSpec& destination,
615 uint32_t uid = UINT32_MAX,
616 uint32_t gid = UINT32_MAX);
619 GetEnvironment (StringList &environment);
622 GetFile (const FileSpec& source,
623 const FileSpec& destination);
626 GetFileExists (const lldb_private::FileSpec& file_spec);
629 GetFilePermissions (const lldb_private::FileSpec &file_spec,
632 error.SetErrorStringWithFormat ("Platform::GetFilePermissions() is not supported in the %s platform", GetName().GetCString());
639 return m_supports_rsync;
643 SetSupportsRSync(bool flag)
645 m_supports_rsync = flag;
651 return m_rsync_opts.c_str();
655 SetRSyncOpts (const char* opts)
657 m_rsync_opts.assign(opts);
663 return m_rsync_prefix.c_str();
667 SetRSyncPrefix (const char* prefix)
669 m_rsync_prefix.assign(prefix);
675 return m_supports_ssh;
679 SetSupportsSSH(bool flag)
681 m_supports_ssh = flag;
687 return m_ssh_opts.c_str();
691 SetSSHOpts (const char* opts)
693 m_ssh_opts.assign(opts);
697 GetIgnoresRemoteHostname ()
699 return m_ignores_remote_hostname;
703 SetIgnoresRemoteHostname(bool flag)
705 m_ignores_remote_hostname = flag;
708 virtual lldb_private::OptionGroupOptions *
709 GetConnectionOptions (CommandInterpreter& interpreter)
714 virtual lldb_private::Error
715 RunShellCommand (const char *command, // Shouldn't be NULL
716 const char *working_dir, // Pass NULL to use the current working directory
717 int *status_ptr, // Pass NULL if you don't want the process exit status
718 int *signo_ptr, // Pass NULL if you don't want the signal that caused the process to exit
719 std::string *command_output, // Pass NULL if you don't want the command output
720 uint32_t timeout_sec); // Timeout in seconds to wait for shell program to finish
723 SetLocalCacheDirectory (const char* local);
726 GetLocalCacheDirectory ();
729 GetPlatformSpecificConnectionInformation()
735 CalculateMD5 (const FileSpec& file_spec,
740 GetResumeCountForLaunchInfo (ProcessLaunchInfo &launch_info)
745 //------------------------------------------------------------------
746 /// Locate a queue name given a thread's qaddr
748 /// On a system using libdispatch ("Grand Central Dispatch") style
749 /// queues, a thread may be associated with a GCD queue or not,
750 /// and a queue may be associated with multiple threads.
751 /// The process/thread must provide a way to find the "dispatch_qaddr"
752 /// for each thread, and from that dispatch_qaddr this Platform method
753 /// will locate the queue name and provide that.
755 /// @param[in] process
756 /// A process is required for reading memory.
758 /// @param[in] dispatch_qaddr
759 /// The dispatch_qaddr for this thread.
762 /// The name of the queue, if there is one. An empty string
763 /// means that this thread is not associated with a dispatch
765 //------------------------------------------------------------------
767 GetQueueNameForThreadQAddress (Process *process, lldb::addr_t dispatch_qaddr)
772 //------------------------------------------------------------------
773 /// Locate a queue ID given a thread's qaddr
775 /// On a system using libdispatch ("Grand Central Dispatch") style
776 /// queues, a thread may be associated with a GCD queue or not,
777 /// and a queue may be associated with multiple threads.
778 /// The process/thread must provide a way to find the "dispatch_qaddr"
779 /// for each thread, and from that dispatch_qaddr this Platform method
780 /// will locate the queue ID and provide that.
782 /// @param[in] process
783 /// A process is required for reading memory.
785 /// @param[in] dispatch_qaddr
786 /// The dispatch_qaddr for this thread.
789 /// The queue_id for this thread, if this thread is associated
790 /// with a dispatch queue. Else LLDB_INVALID_QUEUE_ID is returned.
791 //------------------------------------------------------------------
792 virtual lldb::queue_id_t
793 GetQueueIDForThreadQAddress (Process *process, lldb::addr_t dispatch_qaddr)
795 return LLDB_INVALID_QUEUE_ID;
800 // Set to true when we are able to actually set the OS version while
801 // being connected. For remote platforms, we might set the version ahead
802 // of time before we actually connect and this version might change when
803 // we actually connect to a remote platform. For the host platform this
804 // will be set to the once we call Host::GetOSVersion().
805 bool m_os_version_set_while_connected;
806 bool m_system_arch_set_while_connected;
807 ConstString m_sdk_sysroot; // the root location of where the SDK files are all located
808 ConstString m_sdk_build;
809 std::string m_remote_url;
811 uint32_t m_major_os_version;
812 uint32_t m_minor_os_version;
813 uint32_t m_update_os_version;
814 ArchSpec m_system_arch; // The architecture of the kernel or the remote platform
815 typedef std::map<uint32_t, ConstString> IDToNameMap;
816 Mutex m_uid_map_mutex;
817 Mutex m_gid_map_mutex;
818 IDToNameMap m_uid_map;
819 IDToNameMap m_gid_map;
820 size_t m_max_uid_name_len;
821 size_t m_max_gid_name_len;
822 bool m_supports_rsync;
823 std::string m_rsync_opts;
824 std::string m_rsync_prefix;
826 std::string m_ssh_opts;
827 bool m_ignores_remote_hostname;
828 std::string m_local_cache_directory;
831 GetCachedUserName (uint32_t uid)
833 Mutex::Locker locker (m_uid_map_mutex);
834 IDToNameMap::iterator pos = m_uid_map.find (uid);
835 if (pos != m_uid_map.end())
837 // return the empty string if our string is NULL
838 // so we can tell when things were in the negative
839 // cached (didn't find a valid user name, don't keep
841 return pos->second.AsCString("");
847 SetCachedUserName (uint32_t uid, const char *name, size_t name_len)
849 Mutex::Locker locker (m_uid_map_mutex);
850 ConstString const_name (name);
851 m_uid_map[uid] = const_name;
852 if (m_max_uid_name_len < name_len)
853 m_max_uid_name_len = name_len;
854 // Const strings lives forever in our const string pool, so we can return the const char *
855 return const_name.GetCString();
859 SetUserNameNotFound (uint32_t uid)
861 Mutex::Locker locker (m_uid_map_mutex);
862 m_uid_map[uid] = ConstString();
867 ClearCachedUserNames ()
869 Mutex::Locker locker (m_uid_map_mutex);
874 GetCachedGroupName (uint32_t gid)
876 Mutex::Locker locker (m_gid_map_mutex);
877 IDToNameMap::iterator pos = m_gid_map.find (gid);
878 if (pos != m_gid_map.end())
880 // return the empty string if our string is NULL
881 // so we can tell when things were in the negative
882 // cached (didn't find a valid group name, don't keep
884 return pos->second.AsCString("");
890 SetCachedGroupName (uint32_t gid, const char *name, size_t name_len)
892 Mutex::Locker locker (m_gid_map_mutex);
893 ConstString const_name (name);
894 m_gid_map[gid] = const_name;
895 if (m_max_gid_name_len < name_len)
896 m_max_gid_name_len = name_len;
897 // Const strings lives forever in our const string pool, so we can return the const char *
898 return const_name.GetCString();
902 SetGroupNameNotFound (uint32_t gid)
904 Mutex::Locker locker (m_gid_map_mutex);
905 m_gid_map[gid] = ConstString();
909 ClearCachedGroupNames ()
911 Mutex::Locker locker (m_gid_map_mutex);
916 DISALLOW_COPY_AND_ASSIGN (Platform);
924 m_mutex (Mutex::eMutexTypeRecursive),
926 m_selected_platform_sp()
935 Append (const lldb::PlatformSP &platform_sp, bool set_selected)
937 Mutex::Locker locker (m_mutex);
938 m_platforms.push_back (platform_sp);
940 m_selected_platform_sp = m_platforms.back();
946 Mutex::Locker locker (m_mutex);
947 return m_platforms.size();
951 GetAtIndex (uint32_t idx)
953 lldb::PlatformSP platform_sp;
955 Mutex::Locker locker (m_mutex);
956 if (idx < m_platforms.size())
957 platform_sp = m_platforms[idx];
962 //------------------------------------------------------------------
963 /// Select the active platform.
965 /// In order to debug remotely, other platform's can be remotely
966 /// connected to and set as the selected platform for any subsequent
967 /// debugging. This allows connection to remote targets and allows
968 /// the ability to discover process info, launch and attach to remote
970 //------------------------------------------------------------------
972 GetSelectedPlatform ()
974 Mutex::Locker locker (m_mutex);
975 if (!m_selected_platform_sp && !m_platforms.empty())
976 m_selected_platform_sp = m_platforms.front();
978 return m_selected_platform_sp;
982 SetSelectedPlatform (const lldb::PlatformSP &platform_sp)
986 Mutex::Locker locker (m_mutex);
987 const size_t num_platforms = m_platforms.size();
988 for (size_t idx=0; idx<num_platforms; ++idx)
990 if (m_platforms[idx].get() == platform_sp.get())
992 m_selected_platform_sp = m_platforms[idx];
996 m_platforms.push_back (platform_sp);
997 m_selected_platform_sp = m_platforms.back();
1002 typedef std::vector<lldb::PlatformSP> collection;
1003 mutable Mutex m_mutex;
1004 collection m_platforms;
1005 lldb::PlatformSP m_selected_platform_sp;
1008 DISALLOW_COPY_AND_ASSIGN (PlatformList);
1011 class OptionGroupPlatformRSync : public lldb_private::OptionGroup
1014 OptionGroupPlatformRSync ();
1017 ~OptionGroupPlatformRSync ();
1019 virtual lldb_private::Error
1020 SetOptionValue (CommandInterpreter &interpreter,
1021 uint32_t option_idx,
1022 const char *option_value);
1025 OptionParsingStarting (CommandInterpreter &interpreter);
1027 const lldb_private::OptionDefinition*
1031 GetNumDefinitions ();
1033 // Options table: Required for subclasses of Options.
1035 static lldb_private::OptionDefinition g_option_table[];
1037 // Instance variables to hold the values for command options.
1040 std::string m_rsync_opts;
1041 std::string m_rsync_prefix;
1042 bool m_ignores_remote_hostname;
1044 DISALLOW_COPY_AND_ASSIGN(OptionGroupPlatformRSync);
1047 class OptionGroupPlatformSSH : public lldb_private::OptionGroup
1050 OptionGroupPlatformSSH ();
1053 ~OptionGroupPlatformSSH ();
1055 virtual lldb_private::Error
1056 SetOptionValue (CommandInterpreter &interpreter,
1057 uint32_t option_idx,
1058 const char *option_value);
1061 OptionParsingStarting (CommandInterpreter &interpreter);
1064 GetNumDefinitions ();
1066 const lldb_private::OptionDefinition*
1069 // Options table: Required for subclasses of Options.
1071 static lldb_private::OptionDefinition g_option_table[];
1073 // Instance variables to hold the values for command options.
1076 std::string m_ssh_opts;
1078 DISALLOW_COPY_AND_ASSIGN(OptionGroupPlatformSSH);
1081 class OptionGroupPlatformCaching : public lldb_private::OptionGroup
1084 OptionGroupPlatformCaching ();
1087 ~OptionGroupPlatformCaching ();
1089 virtual lldb_private::Error
1090 SetOptionValue (CommandInterpreter &interpreter,
1091 uint32_t option_idx,
1092 const char *option_value);
1095 OptionParsingStarting (CommandInterpreter &interpreter);
1098 GetNumDefinitions ();
1100 const lldb_private::OptionDefinition*
1103 // Options table: Required for subclasses of Options.
1105 static lldb_private::OptionDefinition g_option_table[];
1107 // Instance variables to hold the values for command options.
1109 std::string m_cache_dir;
1111 DISALLOW_COPY_AND_ASSIGN(OptionGroupPlatformCaching);
1114 } // namespace lldb_private
1116 #endif // liblldb_Platform_h_