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
18namespace lldb_private {
19
20/// Abstract Darwin platform with a potential device support directory.
22public:
25
26protected:
28 const ModuleSpec &module_spec, lldb::ModuleSP &module_sp,
29 llvm::SmallVectorImpl<lldb::ModuleSP> *old_modules, bool *did_create_ptr,
30 lldb_private::Process *process);
31
33 SDKDirectoryInfo(const FileSpec &sdk_dir_spec, llvm::StringRef dirname_str);
36 llvm::VersionTuple version;
37 };
38
39 typedef std::vector<SDKDirectoryInfo> SDKDirectoryInfoCollection;
40
41 /// Look for expanded shared cache directories under the given dir.
42 /// Expanded shared cache directories found under the given dir will
43 /// be added to \a m_sdk_directory_infos.
44 ///
45 /// \param[in] dir
46 /// Directory to search under.
47 ///
48 /// \param[in] log_msg_descriptor
49 /// Text to describe the origin of this directory, in logging.
50 void AddSharedCacheDirectory(llvm::StringRef dir,
51 llvm::StringRef log_msg_descriptor);
52
54
57
60 llvm::sys::fs::file_type ft,
61 llvm::StringRef path);
62
63 const char *GetDeviceSupportDirectory();
65
66 virtual llvm::StringRef GetPlatformName() = 0;
67 virtual llvm::StringRef GetDeviceSupportDirectoryName() = 0;
68
69 std::mutex m_sdk_dir_mutex;
71
72private:
75};
76} // namespace lldb_private
77
78#endif // LLDB_SOURCE_PLUGINS_PLATFORM_MACOSX_PLATFORMDARWINDEVICE_H
A uniqued constant string class.
Definition ConstString.h:40
A file utility class.
Definition FileSpec.h:57
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 GetDeviceSupportDirectoryName()=0
virtual llvm::StringRef GetPlatformName()=0
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 Status GetSharedModuleWithLocalCache(const ModuleSpec &module_spec, lldb::ModuleSP &module_sp, llvm::SmallVectorImpl< lldb::ModuleSP > *old_modules, bool *did_create_ptr, lldb_private::Process *process)
PlatformDarwin(const PlatformDarwin &)=delete
A plug-in interface definition class for debugging a process.
Definition Process.h:354
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)