Expose active and available platform lists via SBDebugger API
Summary:
The available platform list was previously only accessible via the
`platform list` command, this patch makes it possible to access that
list via the SBDebugger API. The active platform list has likewise
been exposed via the SBDebugger API.
Differential Revision: https://reviews.llvm.org/D35760
llvm-svn: 310452
diff --git a/lldb/scripts/interface/SBDebugger.i b/lldb/scripts/interface/SBDebugger.i
index db774d3..07f049b 100644
--- a/lldb/scripts/interface/SBDebugger.i
+++ b/lldb/scripts/interface/SBDebugger.i
@@ -247,6 +247,34 @@
void
SetSelectedPlatform(lldb::SBPlatform &platform);
+ %feature("docstring",
+ "Get the number of currently active platforms."
+ ) GetNumPlatforms;
+ uint32_t
+ GetNumPlatforms ();
+
+ %feature("docstring",
+ "Get one of the currently active platforms."
+ ) GetPlatformAtIndex;
+ lldb::SBPlatform
+ GetPlatformAtIndex (uint32_t idx);
+
+ %feature("docstring",
+ "Get the number of available platforms."
+ ) GetNumAvailablePlatforms;
+ uint32_t
+ GetNumAvailablePlatforms ();
+
+ %feature("docstring", "
+ Get the name and description of one of the available platforms.
+
+ @param idx Zero-based index of the platform for which info should be
+ retrieved, must be less than the value returned by
+ GetNumAvailablePlatforms().
+ ") GetAvailablePlatformInfoAtIndex;
+ lldb::SBStructuredData
+ GetAvailablePlatformInfoAtIndex (uint32_t idx);
+
lldb::SBSourceManager
GetSourceManager ();