summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBDebugger.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/API/SBDebugger.cpp')
-rw-r--r--lldb/source/API/SBDebugger.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/lldb/source/API/SBDebugger.cpp b/lldb/source/API/SBDebugger.cpp
index 700098e2f4e..84b13ab641e 100644
--- a/lldb/source/API/SBDebugger.cpp
+++ b/lldb/source/API/SBDebugger.cpp
@@ -15,6 +15,7 @@
#include "lldb/API/SBBroadcaster.h"
#include "lldb/API/SBCommandInterpreter.h"
#include "lldb/API/SBCommandReturnObject.h"
+#include "lldb/API/SBError.h"
#include "lldb/API/SBEvent.h"
#include "lldb/API/SBFrame.h"
#include "lldb/API/SBInputReader.h"
@@ -811,3 +812,22 @@ SBDebugger::GetID()
return m_opaque_sp->GetID();
return LLDB_INVALID_UID;
}
+
+
+SBError
+SBDebugger::SetCurrentPlatform (const char *platform_name)
+{
+ SBError sb_error;
+ if (m_opaque_sp)
+ {
+ PlatformSP platform_sp (Platform::Create (platform_name, sb_error.ref()));
+
+ if (platform_sp)
+ {
+ bool make_selected = true;
+ m_opaque_sp->GetPlatformList().Append (platform_sp, make_selected);
+ }
+ }
+ return sb_error;
+}
+
OpenPOWER on IntegriCloud