[lldb] Add Debugger & ScriptedMetadata reference to Platform::CreateInstance
authorMed Ismail Bennani <medismail.bennani@gmail.com>
Tue, 10 Jan 2023 04:26:19 +0000 (20:26 -0800)
committerMed Ismail Bennani <medismail.bennani@gmail.com>
Thu, 12 Jan 2023 20:49:05 +0000 (12:49 -0800)
commit2d53527e9c64c70c24e1abba74fa0a8c8b3392b1
tree9d629efec95e7633675765fa301768d60603e4cb
parent3fbc89048517e7152cce763db3b1e5738d558113
[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>
62 files changed:
lldb/bindings/interface/SBPlatform.i
lldb/include/lldb/API/SBDebugger.h
lldb/include/lldb/API/SBPlatform.h
lldb/include/lldb/API/SBStructuredData.h
lldb/include/lldb/Interpreter/OptionGroupPlatform.h
lldb/include/lldb/Target/Platform.h
lldb/include/lldb/lldb-private-interfaces.h
lldb/source/API/SBDebugger.cpp
lldb/source/API/SBPlatform.cpp
lldb/source/Commands/CommandObjectPlatform.cpp
lldb/source/Commands/CommandObjectPlatform.h
lldb/source/Core/Debugger.cpp
lldb/source/Interpreter/OptionGroupPlatform.cpp
lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
lldb/source/Plugins/Platform/Android/PlatformAndroid.cpp
lldb/source/Plugins/Platform/Android/PlatformAndroid.h
lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h
lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
lldb/source/Plugins/Platform/Linux/PlatformLinux.h
lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h
lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.h
lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.h
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleBridge.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleBridge.h
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.h
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.h
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteMacOSX.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteMacOSX.h
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.h
lldb/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp
lldb/source/Plugins/Platform/NetBSD/PlatformNetBSD.h
lldb/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.cpp
lldb/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.h
lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
lldb/source/Plugins/Platform/QemuUser/PlatformQemuUser.cpp
lldb/source/Plugins/Platform/QemuUser/PlatformQemuUser.h
lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp
lldb/source/Plugins/Platform/Windows/PlatformWindows.h
lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h
lldb/source/Target/Platform.cpp
lldb/source/Target/Process.cpp
lldb/source/Target/Target.cpp
lldb/source/Target/TargetList.cpp
lldb/unittests/Core/DiagnosticEventTest.cpp
lldb/unittests/Expression/DWARFExpressionTest.cpp
lldb/unittests/Interpreter/TestCommandPaths.cpp
lldb/unittests/Platform/PlatformAppleSimulatorTest.cpp
lldb/unittests/Platform/PlatformSiginfoTest.cpp
lldb/unittests/Platform/PlatformTest.cpp
lldb/unittests/Process/ProcessEventDataTest.cpp
lldb/unittests/Target/ExecutionContextTest.cpp
lldb/unittests/Target/StackFrameRecognizerTest.cpp
lldb/unittests/Thread/ThreadTest.cpp