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/SmallVector.h"
15#include "llvm/ADT/StringRef.h"
16
17#include <string>
18
19namespace lldb_private {
20
21/// Abstract Darwin platform with a potential device support directory.
23public:
26
27protected:
29 const ModuleSpec &module_spec, lldb::ModuleSP &module_sp,
30 llvm::SmallVectorImpl<lldb::ModuleSP> *old_modules, bool *did_create_ptr,
31 Target &target);
32
34 SDKDirectoryInfo(const FileSpec &sdk_dir_spec, llvm::StringRef dirname_str);
37 llvm::VersionTuple version;
38 };
39
40 typedef std::vector<SDKDirectoryInfo> SDKDirectoryInfoCollection;
41
42 /// Look for expanded shared cache directories under the given dir.
43 /// Expanded shared cache directories found under the given dir will
44 /// be added to \a m_sdk_directory_infos.
45 ///
46 /// \param[in] dir
47 /// Directory to search under.
48 ///
49 /// \param[in] log_msg_descriptor
50 /// Text to describe the origin of this directory, in logging.
51 void AddSharedCacheDirectory(llvm::StringRef dir,
52 llvm::StringRef log_msg_descriptor);
53
55
58
61 llvm::sys::fs::file_type ft,
62 llvm::StringRef path);
63
64 const char *GetDeviceSupportDirectory();
66
67 virtual llvm::StringRef GetPlatformName() = 0;
68 virtual llvm::SmallVector<llvm::StringRef>
70
71 std::mutex m_sdk_dir_mutex;
73
74private:
77};
78} // namespace lldb_private
79
80#endif // LLDB_SOURCE_PLUGINS_PLATFORM_MACOSX_PLATFORMDARWINDEVICE_H
A uniqued constant string class.
Definition ConstString.h:40
A file utility class.
Definition FileSpec.h:56
Abstract Darwin platform with a potential device support directory.
static FileSystem::EnumerateDirectoryResult GetContainedFilesIntoVectorOfFileSpecsCallback(void *baton, llvm::sys::fs::file_type ft, llvm::StringRef path)
virtual llvm::StringRef GetPlatformName()=0
virtual Status GetSharedModuleWithLocalCache(const ModuleSpec &module_spec, lldb::ModuleSP &module_sp, llvm::SmallVectorImpl< lldb::ModuleSP > *old_modules, bool *did_create_ptr, Target &target)
std::vector< SDKDirectoryInfo > SDKDirectoryInfoCollection
const SDKDirectoryInfo * GetSDKDirectoryForCurrentOSVersion()
SDKDirectoryInfoCollection m_sdk_directory_infos
const SDKDirectoryInfo * GetSDKDirectoryForLatestOSVersion()
void AddSharedCacheDirectory(llvm::StringRef dir, llvm::StringRef log_msg_descriptor)
Look for expanded shared cache directories under the given dir.
virtual llvm::SmallVector< llvm::StringRef > GetDeviceSupportDirectoryNames()=0
PlatformDarwin(const PlatformDarwin &)=delete
An error handling class.
Definition Status.h:118
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::Module > ModuleSP
SDKDirectoryInfo(const FileSpec &sdk_dir_spec, llvm::StringRef dirname_str)