1 //===-- PlatformRemoteAppleTV.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_PlatformRemoteAppleTV_h_
11 #define liblldb_PlatformRemoteAppleTV_h_
17 // Other libraries and framework includes
19 #include "lldb/Host/FileSpec.h"
21 #include "PlatformDarwin.h"
23 class PlatformRemoteAppleTV : public PlatformDarwin
26 PlatformRemoteAppleTV();
28 ~PlatformRemoteAppleTV() override = default;
30 //------------------------------------------------------------
32 //------------------------------------------------------------
33 static lldb::PlatformSP
34 CreateInstance (bool force, const lldb_private::ArchSpec *arch);
42 static lldb_private::ConstString
43 GetPluginNameStatic ();
46 GetDescriptionStatic();
48 //------------------------------------------------------------
50 //------------------------------------------------------------
51 //------------------------------------------------------------
52 // lldb_private::PluginInterface functions
53 //------------------------------------------------------------
54 lldb_private::ConstString
55 GetPluginName() override
57 return GetPluginNameStatic();
61 GetPluginVersion() override
66 //------------------------------------------------------------
67 // lldb_private::Platform functions
68 //------------------------------------------------------------
70 ResolveExecutable (const lldb_private::ModuleSpec &module_spec,
71 lldb::ModuleSP &module_sp,
72 const lldb_private::FileSpecList *module_search_paths_ptr) override;
75 GetDescription () override
77 return GetDescriptionStatic();
81 GetStatus (lldb_private::Stream &strm) override;
83 virtual lldb_private::Error
84 GetSymbolFile (const lldb_private::FileSpec &platform_file,
85 const lldb_private::UUID *uuid_ptr,
86 lldb_private::FileSpec &local_file);
89 GetSharedModule (const lldb_private::ModuleSpec &module_spec,
90 lldb_private::Process* process,
91 lldb::ModuleSP &module_sp,
92 const lldb_private::FileSpecList *module_search_paths_ptr,
93 lldb::ModuleSP *old_module_sp_ptr,
94 bool *did_create_ptr) override;
97 GetSupportedArchitectureAtIndex (uint32_t idx,
98 lldb_private::ArchSpec &arch) override;
101 AddClangModuleCompilationOptions (lldb_private::Target *target, std::vector<std::string> &options) override
103 return PlatformDarwin::AddClangModuleCompilationOptionsForSDKType(target, options, PlatformDarwin::SDKType::iPhoneOS);
107 struct SDKDirectoryInfo
109 SDKDirectoryInfo (const lldb_private::FileSpec &sdk_dir_spec);
110 lldb_private::FileSpec directory;
111 lldb_private::ConstString build;
112 uint32_t version_major;
113 uint32_t version_minor;
114 uint32_t version_update;
117 typedef std::vector<SDKDirectoryInfo> SDKDirectoryInfoCollection;
118 SDKDirectoryInfoCollection m_sdk_directory_infos;
119 std::string m_device_support_directory;
120 std::string m_device_support_directory_for_os_version;
121 std::string m_build_update;
122 uint32_t m_last_module_sdk_idx;
123 uint32_t m_connected_module_sdk_idx;
126 UpdateSDKDirectoryInfosIfNeeded();
129 GetDeviceSupportDirectory();
132 GetDeviceSupportDirectoryForOSVersion();
134 const SDKDirectoryInfo *
135 GetSDKDirectoryForLatestOSVersion ();
137 const SDKDirectoryInfo *
138 GetSDKDirectoryForCurrentOSVersion ();
140 static lldb_private::FileSpec::EnumerateDirectoryResult
141 GetContainedFilesIntoVectorOfStringsCallback (void *baton,
142 lldb_private::FileSpec::FileType file_type,
143 const lldb_private::FileSpec &file_spec);
146 FindFileInAllSDKs (const char *platform_file_path,
147 lldb_private::FileSpecList &file_list);
150 GetFileInSDK (const char *platform_file_path,
152 lldb_private::FileSpec &local_file);
155 GetFileInSDKRoot (const char *platform_file_path,
156 const char *sdkroot_path,
157 bool symbols_dirs_only,
158 lldb_private::FileSpec &local_file);
161 FindFileInAllSDKs (const lldb_private::FileSpec &platform_file,
162 lldb_private::FileSpecList &file_list);
165 GetConnectedSDKIndex ();
168 DISALLOW_COPY_AND_ASSIGN (PlatformRemoteAppleTV);
171 #endif // liblldb_PlatformRemoteAppleTV_h_