LLDB  mainline
PlatformDarwinDevice.h
Go to the documentation of this file.
1 //===-- PlatformDarwinDevice.h ----------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLDB_SOURCE_PLUGINS_PLATFORM_MACOSX_PLATFORMDARWINDEVICE_H
10 #define LLDB_SOURCE_PLUGINS_PLATFORM_MACOSX_PLATFORMDARWINDEVICE_H
11 
12 #include "PlatformDarwin.h"
13 
14 #include "llvm/ADT/StringRef.h"
15 
16 #include <string>
17 
18 namespace lldb_private {
19 
20 /// Abstract Darwin platform with a potential device support directory.
22 public:
24  ~PlatformDarwinDevice() override;
25 
26 protected:
28  const ModuleSpec &module_spec, lldb::ModuleSP &module_sp,
29  const FileSpecList *module_search_paths_ptr,
30  llvm::SmallVectorImpl<lldb::ModuleSP> *old_modules, bool *did_create_ptr);
31 
33  SDKDirectoryInfo(const FileSpec &sdk_dir_spec);
36  llvm::VersionTuple version;
38  };
39 
40  typedef std::vector<SDKDirectoryInfo> SDKDirectoryInfoCollection;
41 
43 
46 
49  llvm::sys::fs::file_type ft,
50  llvm::StringRef path);
51 
52  const char *GetDeviceSupportDirectory();
54 
55  virtual llvm::StringRef GetPlatformName() = 0;
56  virtual llvm::StringRef GetDeviceSupportDirectoryName() = 0;
57 
58  std::mutex m_sdk_dir_mutex;
60 
61 private:
64 };
65 } // namespace lldb_private
66 
67 #endif // LLDB_SOURCE_PLUGINS_PLATFORM_MACOSX_PLATFORMDARWINDEVICE_H
lldb_private::PlatformDarwinDevice::GetSDKDirectoryForCurrentOSVersion
const SDKDirectoryInfo * GetSDKDirectoryForCurrentOSVersion()
Definition: PlatformDarwinDevice.cpp:147
lldb_private::PlatformDarwinDevice::GetSDKDirectoryForLatestOSVersion
const SDKDirectoryInfo * GetSDKDirectoryForLatestOSVersion()
Definition: PlatformDarwinDevice.cpp:214
lldb_private::PlatformDarwinDevice::SDKDirectoryInfo::user_cached
bool user_cached
Definition: PlatformDarwinDevice.h:37
lldb_private::PlatformDarwin::PlatformDarwin
PlatformDarwin(const PlatformDarwin &)=delete
lldb_private::PlatformDarwinDevice::SDKDirectoryInfoCollection
std::vector< SDKDirectoryInfo > SDKDirectoryInfoCollection
Definition: PlatformDarwinDevice.h:40
lldb_private::PlatformDarwinDevice::UpdateSDKDirectoryInfosIfNeeded
bool UpdateSDKDirectoryInfosIfNeeded()
Definition: PlatformDarwinDevice.cpp:31
lldb_private::PlatformDarwinDevice::m_sdk_directory_infos
SDKDirectoryInfoCollection m_sdk_directory_infos
Definition: PlatformDarwinDevice.h:59
lldb_private::PlatformDarwinDevice::m_sdk_dir_mutex
std::mutex m_sdk_dir_mutex
Definition: PlatformDarwinDevice.h:58
lldb_private::PlatformDarwinDevice::GetDeviceSupportDirectoryName
virtual llvm::StringRef GetDeviceSupportDirectoryName()=0
lldb_private::PlatformDarwinDevice::SDKDirectoryInfo
Definition: PlatformDarwinDevice.h:32
lldb_private::PlatformDarwinDevice::GetPlatformName
virtual llvm::StringRef GetPlatformName()=0
lldb_private::PlatformDarwinDevice::m_device_support_directory_for_os_version
std::string m_device_support_directory_for_os_version
Definition: PlatformDarwinDevice.h:63
lldb_private::FileSpec
Definition: FileSpec.h:55
lldb_private::PlatformDarwinDevice::m_device_support_directory
std::string m_device_support_directory
Definition: PlatformDarwinDevice.h:62
lldb_private::FileSystem::EnumerateDirectoryResult
EnumerateDirectoryResult
Definition: FileSystem.h:166
lldb_private::ConstString
Definition: ConstString.h:39
lldb_private::PlatformDarwinDevice::GetContainedFilesIntoVectorOfStringsCallback
static FileSystem::EnumerateDirectoryResult GetContainedFilesIntoVectorOfStringsCallback(void *baton, llvm::sys::fs::file_type ft, llvm::StringRef path)
Definition: PlatformDarwinDevice.cpp:24
lldb_private::PlatformDarwinDevice::GetDeviceSupportDirectoryForOSVersion
const char * GetDeviceSupportDirectoryForOSVersion()
Definition: PlatformDarwinDevice.cpp:249
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
lldb_private::ModuleSpec
Definition: ModuleSpec.h:27
lldb_private::Status
Definition: Status.h:44
lldb_private::PlatformDarwinDevice
Abstract Darwin platform with a potential device support directory.
Definition: PlatformDarwinDevice.h:21
lldb_private::PlatformDarwinDevice::GetSharedModuleWithLocalCache
virtual Status GetSharedModuleWithLocalCache(const ModuleSpec &module_spec, lldb::ModuleSP &module_sp, const FileSpecList *module_search_paths_ptr, llvm::SmallVectorImpl< lldb::ModuleSP > *old_modules, bool *did_create_ptr)
Definition: PlatformDarwinDevice.cpp:295
lldb_private::PlatformDarwinDevice::GetDeviceSupportDirectory
const char * GetDeviceSupportDirectory()
Definition: PlatformDarwinDevice.cpp:228
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::PlatformDarwinDevice::~PlatformDarwinDevice
~PlatformDarwinDevice() override
llvm::SmallVectorImpl
Definition: Disassembler.h:42
lldb_private::PlatformDarwinDevice::SDKDirectoryInfo::version
llvm::VersionTuple version
Definition: PlatformDarwinDevice.h:36
lldb_private::PlatformDarwinDevice::SDKDirectoryInfo::SDKDirectoryInfo
SDKDirectoryInfo(const FileSpec &sdk_dir_spec)
lldb_private::PlatformDarwin
Definition: PlatformDarwin.h:45
PlatformDarwin.h
lldb_private::PlatformDarwinDevice::SDKDirectoryInfo::build
ConstString build
Definition: PlatformDarwinDevice.h:35
lldb_private::PlatformDarwinDevice::SDKDirectoryInfo::directory
FileSpec directory
Definition: PlatformDarwinDevice.h:34