summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp')
-rw-r--r--lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp b/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
index ecc96c34b48..f64235da80c 100644
--- a/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
+++ b/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
@@ -25,9 +25,20 @@ using namespace lldb;
using namespace lldb_private;
Platform *
-PlatformFreeBSD::CreateInstance ()
+PlatformFreeBSD::CreateInstance (bool force, const lldb_private::ArchSpec *arch)
{
- return new PlatformFreeBSD (true);
+ bool create = force;
+ if (create == false && arch && arch->IsValid())
+ {
+ const llvm::Triple &triple = arch->GetTriple();
+ const llvm::Triple::OSType os = triple.getOS();
+ if (os == llvm::Triple::FreeBSD || os == llvm::Triple::KFreeBSD)
+ create = true;
+ }
+ if (create)
+ return new PlatformFreeBSD (true);
+ return NULL;
+
}
const char *
OpenPOWER on IntegriCloud