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 liblldb_PlatformMacOSX_h_
10 #define liblldb_PlatformMacOSX_h_
11 
12 #include "PlatformDarwin.h"
13 
15 public:
16  PlatformMacOSX(bool is_host);
17 
18  ~PlatformMacOSX() override;
19 
20  // Class functions
21  static lldb::PlatformSP CreateInstance(bool force,
22  const lldb_private::ArchSpec *arch);
23 
24  static void Initialize();
25 
26  static void Terminate();
27 
29 
30  static const char *GetDescriptionStatic(bool is_host);
31 
32  // lldb_private::PluginInterface functions
34  return GetPluginNameStatic(IsHost());
35  }
36 
37  uint32_t GetPluginVersion() override { return 1; }
38 
40  GetSharedModule(const lldb_private::ModuleSpec &module_spec,
41  lldb_private::Process *process, lldb::ModuleSP &module_sp,
42  const lldb_private::FileSpecList *module_search_paths_ptr,
43  lldb::ModuleSP *old_module_sp_ptr,
44  bool *did_create_ptr) override;
45 
46  const char *GetDescription() override {
47  return GetDescriptionStatic(IsHost());
48  }
49 
51  GetSymbolFile(const lldb_private::FileSpec &platform_file,
52  const lldb_private::UUID *uuid_ptr,
53  lldb_private::FileSpec &local_file);
54 
57  const lldb_private::FileSpec &destination) override {
58  return PlatformDarwin::GetFile(source, destination);
59  }
60 
62  GetFileWithUUID(const lldb_private::FileSpec &platform_file,
63  const lldb_private::UUID *uuid_ptr,
64  lldb_private::FileSpec &local_file) override;
65 
67  lldb_private::ArchSpec &arch) override;
68 
70  GetSDKDirectory(lldb_private::Target &target) override;
71 
72  void
74  std::vector<std::string> &options) override {
76  target, options, PlatformDarwin::SDKType::MacOSX);
77  }
78 
79 private:
80  DISALLOW_COPY_AND_ASSIGN(PlatformMacOSX);
81 };
82 
83 #endif // liblldb_PlatformMacOSX_h_
uint32_t GetPluginVersion() override
static const char * GetDescriptionStatic(bool is_host)
const char * GetDescription() override
bool IsHost() const
Definition: Platform.h:450
A file utility class.
Definition: FileSpec.h:55
An architecture specification class.
Definition: ArchSpec.h:32
static lldb_private::ConstString GetPluginNameStatic(bool is_host)
static void Terminate()
lldb_private::Status GetSymbolFile(const lldb_private::FileSpec &platform_file, const lldb_private::UUID *uuid_ptr, lldb_private::FileSpec &local_file)
lldb_private::Status GetFile(const lldb_private::FileSpec &source, const lldb_private::FileSpec &destination) override
static void Initialize()
A plug-in interface definition class for debugging a process.
Definition: Process.h:353
static lldb::PlatformSP CreateInstance(bool force, const lldb_private::ArchSpec *arch)
lldb_private::ConstString GetPluginName() override
lldb_private::Status GetFile(const lldb_private::FileSpec &source, const lldb_private::FileSpec &destination) override
lldb_private::ConstString GetSDKDirectory(lldb_private::Target &target) override
PlatformMacOSX(bool is_host)
Default Constructor.
A uniqued constant string class.
Definition: ConstString.h:38
lldb_private::Status GetFileWithUUID(const lldb_private::FileSpec &platform_file, const lldb_private::UUID *uuid_ptr, lldb_private::FileSpec &local_file) override
Locate a file for a platform.
~PlatformMacOSX() override
Destructor.
void AddClangModuleCompilationOptions(lldb_private::Target *target, std::vector< std::string > &options) override
void AddClangModuleCompilationOptionsForSDKType(lldb_private::Target *target, std::vector< std::string > &options, SDKType sdk_type)
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, lldb::ModuleSP *old_module_sp_ptr, bool *did_create_ptr) override
bool GetSupportedArchitectureAtIndex(uint32_t idx, lldb_private::ArchSpec &arch) override
Get the platform&#39;s supported architectures in the order in which they should be searched.
An error handling class.
Definition: Status.h:44