diff options
author | Med Ismail Bennani <medismail.bennani@gmail.com> | 2023-01-09 20:26:19 -0800 |
---|---|---|
committer | Med Ismail Bennani <medismail.bennani@gmail.com> | 2023-01-12 12:49:05 -0800 |
commit | 2d53527e9c64c70c24e1abba74fa0a8c8b3392b1 (patch) | |
tree | 9d629efec95e7633675765fa301768d60603e4cb /lldb/bindings | |
parent | 3fbc89048517e7152cce763db3b1e5738d558113 (diff) | |
download | llvm-2d53527e9c64c70c24e1abba74fa0a8c8b3392b1.tar.gz |
[lldb] Add Debugger & ScriptedMetadata reference to Platform::CreateInstance
This patch is preparatory work for Scripted Platform support and does
multiple things:
First, it introduces new options for the `platform select` command and
`SBPlatform::Create` API, to hold a reference to the debugger object,
the name of the python script managing the Scripted Platform and a
structured data dictionary that the user can use to pass arbitrary data.
Then, it updates the various `Create` and `GetOrCreate` methods for
the `Platform` and `PlatformList` classes to pass down the new parameter
to the `Platform::CreateInstance` callbacks.
Finally, it updates every callback to reflect these changes.
Differential Revision: https://reviews.llvm.org/D139249
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
Diffstat (limited to 'lldb/bindings')
-rw-r--r-- | lldb/bindings/interface/SBPlatform.i | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lldb/bindings/interface/SBPlatform.i b/lldb/bindings/interface/SBPlatform.i index 6413784e69e7..a57deca00e1d 100644 --- a/lldb/bindings/interface/SBPlatform.i +++ b/lldb/bindings/interface/SBPlatform.i @@ -126,6 +126,18 @@ public: SBPlatform (const char *); + %feature("docstring", " + Create a platform instance using a specific platform plugin name, debugger, + script name and user-provided dictionary. + + :param platform_name: name of the platform plugin to use to create the platform + :param debugger: debugger instance owning the platform + :param script_name: name of the script class and module to use to create the platform + :param dict: user-provided dictionary that can be used when instanciating a platform + ") + SBPlatform (const char *, const SBDebugger&, + const char *, const SBStructuredData&); + ~SBPlatform(); static SBPlatform GetHostPlatform(); |