summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp')
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp26
1 files changed, 24 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
index ad495731129..61caafceccd 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
@@ -60,9 +60,31 @@ PlatformRemoteiOS::Terminate ()
}
Platform*
-PlatformRemoteiOS::CreateInstance ()
+PlatformRemoteiOS::CreateInstance (bool force, const ArchSpec *arch)
{
- return new PlatformRemoteiOS ();
+ bool create = force;
+ if (create == false && arch && arch->IsValid())
+ {
+ switch (arch->GetMachine())
+ {
+ case llvm::Triple::arm:
+ case llvm::Triple::thumb:
+ {
+ const llvm::Triple &triple = arch->GetTriple();
+ const llvm::Triple::OSType os = triple.getOS();
+ const llvm::Triple::VendorType vendor = triple.getVendor();
+ if (os == llvm::Triple::Darwin && vendor == llvm::Triple::Apple)
+ create = true;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (create)
+ return new PlatformRemoteiOS ();
+ return NULL;
}
OpenPOWER on IntegriCloud