1 //===-- PlatformMacOSX.h ----------------------------------------*- C++ -*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 #ifndef liblldb_PlatformMacOSX_h_ 11 #define liblldb_PlatformMacOSX_h_ 12 13 // C Includes 14 // C++ Includes 15 // Other libraries and framework includes 16 // Project includes 17 #include "PlatformDarwin.h" 18 19 class PlatformMacOSX : public PlatformDarwin { 20 public: 21 PlatformMacOSX(bool is_host); 22 23 ~PlatformMacOSX() override; 24 25 //------------------------------------------------------------ 26 // Class functions 27 //------------------------------------------------------------ 28 static lldb::PlatformSP CreateInstance(bool force, 29 const lldb_private::ArchSpec *arch); 30 31 static void Initialize(); 32 33 static void Terminate(); 34 35 static lldb_private::ConstString GetPluginNameStatic(bool is_host); 36 37 static const char *GetDescriptionStatic(bool is_host); 38 39 //------------------------------------------------------------ 40 // lldb_private::PluginInterface functions 41 //------------------------------------------------------------ 42 lldb_private::ConstString GetPluginName() override { 43 return GetPluginNameStatic(IsHost()); 44 } 45 46 uint32_t GetPluginVersion() override { return 1; } 47 48 lldb_private::Status 49 GetSharedModule(const lldb_private::ModuleSpec &module_spec, 50 lldb_private::Process *process, lldb::ModuleSP &module_sp, 51 const lldb_private::FileSpecList *module_search_paths_ptr, 52 lldb::ModuleSP *old_module_sp_ptr, 53 bool *did_create_ptr) override; 54 55 const char *GetDescription() override { 56 return GetDescriptionStatic(IsHost()); 57 } 58 59 lldb_private::Status 60 GetSymbolFile(const lldb_private::FileSpec &platform_file, 61 const lldb_private::UUID *uuid_ptr, 62 lldb_private::FileSpec &local_file); 63 64 lldb_private::Status 65 GetFile(const lldb_private::FileSpec &source, 66 const lldb_private::FileSpec &destination) override { 67 return PlatformDarwin::GetFile(source, destination); 68 } 69 70 lldb_private::Status 71 GetFileWithUUID(const lldb_private::FileSpec &platform_file, 72 const lldb_private::UUID *uuid_ptr, 73 lldb_private::FileSpec &local_file) override; 74 75 bool GetSupportedArchitectureAtIndex(uint32_t idx, 76 lldb_private::ArchSpec &arch) override; 77 78 lldb_private::ConstString 79 GetSDKDirectory(lldb_private::Target &target) override; 80 81 void 82 AddClangModuleCompilationOptions(lldb_private::Target *target, 83 std::vector<std::string> &options) override { 84 return PlatformDarwin::AddClangModuleCompilationOptionsForSDKType( 85 target, options, PlatformDarwin::SDKType::MacOSX); 86 } 87 88 private: 89 DISALLOW_COPY_AND_ASSIGN(PlatformMacOSX); 90 }; 91 92 #endif // liblldb_PlatformMacOSX_h_ 93