36 void PlatformRemoteAppleWatch::Initialize() {
37 PlatformDarwin::Initialize();
40 PluginManager::RegisterPlugin(
41 PlatformRemoteAppleWatch::GetPluginNameStatic(),
42 PlatformRemoteAppleWatch::GetDescriptionStatic(),
43 PlatformRemoteAppleWatch::CreateInstance);
47 void PlatformRemoteAppleWatch::Terminate() {
50 PluginManager::UnregisterPlugin(PlatformRemoteAppleWatch::CreateInstance);
54 PlatformDarwin::Terminate();
57 PlatformSP PlatformRemoteAppleWatch::CreateInstance(
bool force,
61 const char *arch_name;
67 const char *triple_cstr =
68 arch ? arch->
GetTriple().getTriple().c_str() :
"<null>";
70 LLDB_LOGF(log,
"PlatformRemoteAppleWatch::%s(force=%s, arch={%s,%s})",
71 __FUNCTION__, force ?
"true" :
"false", arch_name, triple_cstr);
75 if (!create && arch && arch->
IsValid()) {
77 case llvm::Triple::arm:
78 case llvm::Triple::aarch64:
79 case llvm::Triple::aarch64_32:
80 case llvm::Triple::thumb: {
81 const llvm::Triple &triple = arch->
GetTriple();
82 llvm::Triple::VendorType vendor = triple.getVendor();
84 case llvm::Triple::Apple:
88 #if defined(__APPLE__)
92 case llvm::Triple::UnknownVendor:
101 switch (triple.getOS()) {
102 case llvm::Triple::WatchOS:
117 #if defined(__APPLE__) && \
118 (defined(__arm__) || defined(__arm64__) || defined(__aarch64__))
121 if (force ==
false) {
127 LLDB_LOGF(log,
"PlatformRemoteAppleWatch::%s() creating platform",
133 LLDB_LOGF(log,
"PlatformRemoteAppleWatch::%s() aborting creation of platform",
136 return lldb::PlatformSP();
139 llvm::StringRef PlatformRemoteAppleWatch::GetDescriptionStatic() {
140 return "Remote Apple Watch platform plug-in.";
144 PlatformRemoteAppleWatch::PlatformRemoteAppleWatch()
147 std::vector<ArchSpec>
152 switch (system_core) {
166 ArchSpec(
"arm64_32-apple-watchos")};
173 ArchSpec(
"arm64_32-apple-watchos")};
179 ArchSpec(
"arm64_32-apple-watchos")};
184 return "watchOS DeviceSupport";
188 return "WatchOS.platform";