LLDB  mainline
HostInfoMacOSX.h
Go to the documentation of this file.
1 //===-- HostInfoMacOSX.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_HOST_MACOSX_HOSTINFOMACOSX_H
10 #define LLDB_HOST_MACOSX_HOSTINFOMACOSX_H
11 
13 #include "lldb/Utility/FileSpec.h"
14 #include "lldb/Utility/XcodeSDK.h"
15 #include "llvm/Support/VersionTuple.h"
16 
17 namespace lldb_private {
18 
19 class ArchSpec;
20 
21 class HostInfoMacOSX : public HostInfoPosix {
22  friend class HostInfoBase;
23 
24 public:
25  static llvm::VersionTuple GetOSVersion();
26  static llvm::VersionTuple GetMacCatalystVersion();
27  static bool GetOSBuildString(std::string &s);
28  static bool GetOSKernelDescription(std::string &s);
32 
33  /// Query xcrun to find an Xcode SDK directory.
34  static llvm::StringRef GetXcodeSDKPath(XcodeSDK sdk);
35 
36  /// Shared cache utilities
38  GetSharedCacheImageInfo(llvm::StringRef image_name);
39 
40 protected:
41  static bool ComputeSupportExeDirectory(FileSpec &file_spec);
42  static void ComputeHostArchitectureSupport(ArchSpec &arch_32,
43  ArchSpec &arch_64);
44  static bool ComputeHeaderDirectory(FileSpec &file_spec);
45  static bool ComputeSystemPluginsDirectory(FileSpec &file_spec);
46  static bool ComputeUserPluginsDirectory(FileSpec &file_spec);
47 };
48 }
49 
50 #endif
lldb_private::HostInfoMacOSX::ComputeHostArchitectureSupport
static void ComputeHostArchitectureSupport(ArchSpec &arch_32, ArchSpec &arch_64)
Definition: HostInfoMacOSX.mm:229
lldb_private::HostInfoMacOSX::GetXcodeSDKPath
static llvm::StringRef GetXcodeSDKPath(XcodeSDK sdk)
Query xcrun to find an Xcode SDK directory.
Definition: HostInfoMacOSX.mm:483
lldb_private::ArchSpec
Definition: ArchSpec.h:33
HostInfoPosix.h
lldb_private::HostInfoPosix
Definition: HostInfoPosix.h:19
lldb_private::HostInfoMacOSX::GetSharedCacheImageInfo
static SharedCacheImageInfo GetSharedCacheImageInfo(llvm::StringRef image_name)
Shared cache utilities.
Definition: HostInfoMacOSX.mm:553
lldb_private::HostInfoMacOSX::GetXcodeDeveloperDirectory
static FileSpec GetXcodeDeveloperDirectory()
Definition: HostInfoMacOSX.mm:367
lldb_private::HostInfoMacOSX::ComputeSupportExeDirectory
static bool ComputeSupportExeDirectory(FileSpec &file_spec)
Definition: HostInfoMacOSX.mm:132
lldb_private::HostInfoMacOSX::ComputeUserPluginsDirectory
static bool ComputeUserPluginsDirectory(FileSpec &file_spec)
Definition: HostInfoMacOSX.mm:222
lldb_private::XcodeSDK
An abstraction for Xcode-style SDKs that works like ArchSpec.
Definition: XcodeSDK.h:24
XcodeSDK.h
lldb_private::FileSpec
Definition: FileSpec.h:56
lldb_private::HostInfoMacOSX
Definition: HostInfoMacOSX.h:21
lldb_private::HostInfoMacOSX::GetOSVersion
static llvm::VersionTuple GetOSVersion()
Definition: HostInfoMacOSX.mm:94
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
lldb_private::SharedCacheImageInfo
Definition: HostInfoBase.h:28
lldb_private::HostInfoMacOSX::ComputeSystemPluginsDirectory
static bool ComputeSystemPluginsDirectory(FileSpec &file_spec)
Definition: HostInfoMacOSX.mm:203
lldb_private::HostInfoBase
Definition: HostInfoBase.h:33
lldb_private::HostInfoMacOSX::GetProgramFileSpec
static FileSpec GetProgramFileSpec()
Definition: HostInfoMacOSX.mm:109
lldb_private::HostInfoMacOSX::GetMacCatalystVersion
static llvm::VersionTuple GetMacCatalystVersion()
Definition: HostInfoMacOSX.mm:101
lldb_private::HostInfoMacOSX::GetXcodeContentsDirectory
static FileSpec GetXcodeContentsDirectory()
Definition: HostInfoMacOSX.mm:325
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
FileSpec.h
lldb_private::HostInfoMacOSX::ComputeHeaderDirectory
static bool ComputeHeaderDirectory(FileSpec &file_spec)
Definition: HostInfoMacOSX.mm:185
lldb_private::HostInfoMacOSX::GetOSBuildString
static bool GetOSBuildString(std::string &s)
Definition: HostInfoMacOSX.mm:58
lldb_private::HostInfoMacOSX::GetOSKernelDescription
static bool GetOSKernelDescription(std::string &s)
Definition: HostInfoMacOSX.mm:71