LLDB  mainline
PlatformMacOSX.h
Go to the documentation of this file.
1 //===-- PlatformMacOSX.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_PLATFORMMACOSX_H
10 #define LLDB_SOURCE_PLUGINS_PLATFORM_MACOSX_PLATFORMMACOSX_H
11 
12 #include "PlatformDarwin.h"
13 
15 public:
17 
18  // Class functions
19  static lldb::PlatformSP CreateInstance(bool force,
20  const lldb_private::ArchSpec *arch);
21 
22  static void Initialize();
23 
24  static void Terminate();
25 
27 
28  static const char *GetDescriptionStatic();
29 
30  // lldb_private::PluginInterface functions
32  return GetPluginNameStatic();
33  }
34 
35  uint32_t GetPluginVersion() override { return 1; }
36 
38  GetSharedModule(const lldb_private::ModuleSpec &module_spec,
39  lldb_private::Process *process, lldb::ModuleSP &module_sp,
40  const lldb_private::FileSpecList *module_search_paths_ptr,
42  bool *did_create_ptr) override;
43 
44  const char *GetDescription() override { return GetDescriptionStatic(); }
45 
48  const lldb_private::FileSpec &destination) override {
49  return PlatformDarwin::GetFile(source, destination);
50  }
51 
53  lldb_private::ArchSpec &arch) override;
54 
56  GetSDKDirectory(lldb_private::Target &target) override;
57 
58  void
60  std::vector<std::string> &options) override {
62  target, options, lldb_private::XcodeSDK::Type::MacOSX);
63  }
64 
65 private:
66 #if defined(__arm__) || defined(__arm64__) || defined(__aarch64__)
67  uint32_t m_num_arm_arches = 0;
68 #endif
69 };
70 
71 #endif // LLDB_SOURCE_PLUGINS_PLATFORM_MACOSX_PLATFORMMACOSX_H
PlatformMacOSX::CreateInstance
static lldb::PlatformSP CreateInstance(bool force, const lldb_private::ArchSpec *arch)
Definition: PlatformMacOSX.cpp:97
lldb_private::ArchSpec
Definition: ArchSpec.h:33
lldb_private::Process
Definition: Process.h:342
PlatformMacOSX::GetSDKDirectory
lldb_private::ConstString GetSDKDirectory(lldb_private::Target &target) override
Definition: PlatformMacOSX.cpp:106
lldb_private::Target
Definition: Target.h:445
PlatformPOSIX::GetFile
lldb_private::Status GetFile(const lldb_private::FileSpec &source, const lldb_private::FileSpec &destination) override
Definition: PlatformPOSIX.cpp:153
PlatformDarwin
Definition: PlatformDarwin.h:25
PlatformMacOSX::PlatformMacOSX
PlatformMacOSX()
Default Constructor.
Definition: PlatformMacOSX.cpp:104
PlatformMacOSX::GetDescription
const char * GetDescription() override
Definition: PlatformMacOSX.h:44
PlatformMacOSX::GetSharedModule
lldb_private::Status GetSharedModule(const lldb_private::ModuleSpec &module_spec, lldb_private::Process *process, lldb::ModuleSP &module_sp, const lldb_private::FileSpecList *module_search_paths_ptr, llvm::SmallVectorImpl< lldb::ModuleSP > *old_modules, bool *did_create_ptr) override
Definition: PlatformMacOSX.cpp:176
lldb_private::FileSpec
Definition: FileSpec.h:56
PlatformMacOSX::GetPluginVersion
uint32_t GetPluginVersion() override
Definition: PlatformMacOSX.h:35
PlatformDarwin::AddClangModuleCompilationOptionsForSDKType
void AddClangModuleCompilationOptionsForSDKType(lldb_private::Target *target, std::vector< std::string > &options, lldb_private::XcodeSDK::Type sdk_type)
Definition: PlatformDarwin.cpp:1513
lldb_private::ConstString
Definition: ConstString.h:40
PlatformMacOSX::GetSupportedArchitectureAtIndex
bool GetSupportedArchitectureAtIndex(uint32_t idx, lldb_private::ArchSpec &arch) override
Get the platform's supported architectures in the order in which they should be searched.
Definition: PlatformMacOSX.cpp:141
PlatformMacOSX::Initialize
static void Initialize()
Definition: PlatformMacOSX.cpp:45
PlatformMacOSX::GetPluginNameStatic
static lldb_private::ConstString GetPluginNameStatic()
Definition: PlatformMacOSX.cpp:88
PlatformMacOSX::GetFile
lldb_private::Status GetFile(const lldb_private::FileSpec &source, const lldb_private::FileSpec &destination) override
Definition: PlatformMacOSX.h:47
PlatformMacOSX::GetPluginName
lldb_private::ConstString GetPluginName() override
Definition: PlatformMacOSX.h:31
PlatformMacOSX::GetDescriptionStatic
static const char * GetDescriptionStatic()
Definition: PlatformMacOSX.cpp:93
PlatformMacOSX::Terminate
static void Terminate()
Definition: PlatformMacOSX.cpp:69
lldb_private::ModuleSpec
Definition: ModuleSpec.h:26
lldb_private::Status
Definition: Status.h:44
uint32_t
llvm::SmallVectorImpl
Definition: Disassembler.h:42
PlatformMacOSX::AddClangModuleCompilationOptions
void AddClangModuleCompilationOptions(lldb_private::Target *target, std::vector< std::string > &options) override
Definition: PlatformMacOSX.h:59
PlatformMacOSX
Definition: PlatformMacOSX.h:14
PlatformDarwin.h