26#include "lldb/Host/Config.h"
53 PlatformDarwinKernel::Initialize();
63 default_platform_sp->SetSystemArchitecture(HostInfo::GetArchitecture());
84 PlatformDarwinKernel::Terminate();
93 return "Local Mac OS X user platform plug-in.";
107 std::vector<ArchSpec> result;
108#if defined(__arm__) || defined(__arm64__) || defined(__aarch64__)
114 if (host_os == llvm::Triple::MacOSX) {
118 result.push_back(
ArchSpec(
"x86_64-apple-macosx"));
119 result.push_back(
ArchSpec(
"x86_64-apple-ios-macabi"));
120 result.push_back(
ArchSpec(
"arm64-apple-ios-macabi"));
121 result.push_back(
ArchSpec(
"arm64e-apple-ios-macabi"));
127 if (!process_host_arch ||
128 process_host_arch.
GetTriple().getOS() == llvm::Triple::MacOSX) {
129 result.push_back(
ArchSpec(
"arm64-apple-ios"));
130 result.push_back(
ArchSpec(
"arm64e-apple-ios"));
135 result.push_back(
ArchSpec(
"x86_64-apple-ios-macabi"));
145 module_spec, module_sp, old_modules, did_create_ptr, target);
150 ObjectFile *objfile = module_sp->GetObjectFile();
151 if (objfile ==
nullptr) {
156 llvm::SmallVector<lldb::ModuleSP, 1> old_x86_64_modules;
157 bool did_create =
false;
159 module_spec_x86_64, x86_64_module_sp, &old_x86_64_modules,
160 &did_create, target);
161 if (x86_64_module_sp && x86_64_module_sp->GetObjectFile()) {
162 module_sp = x86_64_module_sp;
164 old_modules->append(old_x86_64_modules.begin(),
165 old_x86_64_modules.end());
167 *did_create_ptr = did_create;
176 old_modules, did_create_ptr);
181llvm::SmallVector<llvm::StringRef>
183 return {
"macOS DeviceSupport"};
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_PLUGIN_DEFINE(PluginName)
An architecture specification class.
llvm::Triple & GetTriple()
Architecture triple accessor.
ArchSpec & GetArchitecture()
A plug-in interface definition class for object file parsers.
static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description, ABICreateInstance create_callback)
static bool UnregisterPlugin(ABICreateInstance create_callback)
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::Platform > PlatformSP
std::shared_ptr< lldb_private::Module > ModuleSP