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
15#include "lldb/Utility/Status.h"
17#include "lldb/lldb-forward.h"
18#include "llvm/ADT/SmallVector.h"
19#include "llvm/ADT/StringRef.h"
20
21#include <vector>
22
23namespace lldb_private {
24class ArchSpec;
25class FileSpec;
26class FileSpecList;
27class ModuleSpec;
28class Process;
29class Target;
30
32public:
34
35 static lldb::PlatformSP CreateInstance(bool force, const ArchSpec *arch);
36
37 static void Initialize();
38
39 static void Terminate();
40
41 static llvm::StringRef GetPluginNameStatic() {
43 }
44
45 static llvm::StringRef GetDescriptionStatic();
46
47 llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
48
49 Status GetSharedModule(const ModuleSpec &module_spec, Process *process,
50 lldb::ModuleSP &module_sp,
51 const FileSpecList *module_search_paths_ptr,
53 bool *did_create_ptr) override;
54
55 llvm::StringRef GetDescription() override { return GetDescriptionStatic(); }
56
57 Status GetFile(const FileSpec &source, const FileSpec &destination) override {
58 return PlatformDarwin::GetFile(source, destination);
59 }
60
61 std::vector<ArchSpec>
62 GetSupportedArchitectures(const ArchSpec &process_host_arch) override;
63
64 ConstString GetSDKDirectory(Target &target) override;
65
66 void
68 std::vector<std::string> &options) override {
70 target, options, XcodeSDK::Type::MacOSX);
71 }
72
73protected:
74 llvm::StringRef GetDeviceSupportDirectoryName() override;
75 llvm::StringRef GetPlatformName() override;
76};
77
78} // namespace lldb_private
79
80#endif // LLDB_SOURCE_PLUGINS_PLATFORM_MACOSX_PLATFORMMACOSX_H
An architecture specification class.
Definition: ArchSpec.h:31
A uniqued constant string class.
Definition: ConstString.h:40
A file collection class.
Definition: FileSpecList.h:85
A file utility class.
Definition: FileSpec.h:56
Abstract Darwin platform with a potential device support directory.
void AddClangModuleCompilationOptionsForSDKType(Target *target, std::vector< std::string > &options, XcodeSDK::Type sdk_type)
ConstString GetSDKDirectory(Target &target) override
void AddClangModuleCompilationOptions(Target *target, std::vector< std::string > &options) override
static llvm::StringRef GetDescriptionStatic()
llvm::StringRef GetDeviceSupportDirectoryName() override
llvm::StringRef GetDescription() override
llvm::StringRef GetPlatformName() override
static llvm::StringRef GetPluginNameStatic()
static lldb::PlatformSP CreateInstance(bool force, const ArchSpec *arch)
llvm::StringRef GetPluginName() override
Status GetFile(const FileSpec &source, const FileSpec &destination) override
std::vector< ArchSpec > GetSupportedArchitectures(const ArchSpec &process_host_arch) override
Get the platform's supported architectures in the order in which they should be searched.
Status GetSharedModule(const ModuleSpec &module_spec, Process *process, lldb::ModuleSP &module_sp, const FileSpecList *module_search_paths_ptr, llvm::SmallVectorImpl< lldb::ModuleSP > *old_modules, bool *did_create_ptr) override
PlatformMacOSX()
Default Constructor.
virtual Status GetFile(const FileSpec &source, const FileSpec &destination)
Definition: Platform.cpp:1244
static const char * GetHostPlatformName()
Definition: Platform.cpp:61
A plug-in interface definition class for debugging a process.
Definition: Process.h:341
An error handling class.
Definition: Status.h:44
A class that represents a running process on the host machine.
Definition: SBAttachInfo.h:14
std::shared_ptr< lldb_private::Platform > PlatformSP
Definition: lldb-forward.h:380
std::shared_ptr< lldb_private::Module > ModuleSP
Definition: lldb-forward.h:365