Added the ability to set the Platform path for a module through the SBModule
interface.
Added a quick way to set the platform though the SBDebugger interface. I will
actually an a SBPlatform support soon, but for now this will do.
ConnectionFileDescriptor can be passed a url formatted as: "fd://<fd>" where
<fd> is a file descriptor in the current process. This is handy if you have
services, deamons, or other tools that can spawn processes and give you a
file handle.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130565 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBDebugger.cpp b/source/API/SBDebugger.cpp
index 700098e..84b13ab 100644
--- a/source/API/SBDebugger.cpp
+++ b/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 @@
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;
+}
+