[Lldb-commits] [PATCH] D142266: [lldb] Add PlatformMetadata for ScriptedPlatform
Med Ismail Bennani via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Jan 20 17:48:54 PST 2023
mib created this revision.
mib added reviewers: JDevlieghere, labath.
mib added a project: LLDB.
Herald added a project: All.
mib requested review of this revision.
Herald added a subscriber: lldb-commits.
This patch is a less intrusive implementation of 2d53527 <https://reviews.llvm.org/rG2d53527e9c64c70c24e1abba74fa0a8c8b3392b1>.
It introduces a new PlatformMetadata held by every platform that
contains various objects that might be used my a platform instance.
In its current form, the PlatformMetadata holds a reference to the
Debugger and a ScriptedMetadata pointer. These are necessary in other to
instanciate the scripted object that the ScriptedPlatform interacts with.
In order to make it less introsive with the rest of lldb's platform
creation code, platform metadata are set after the platform creation,
and requires to platform to reload them (using Platform::ReloadMetadata).
This approach has the tradeoff that the ScriptedPlaform instance is
technically invalid and useless right after its creation. However, the user
should never be in that situation, since we reload the platform metadata
everytime with create or select the platform.
Signed-off-by: Med Ismail Bennani <medismail.bennani at gmail.com>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D142266
Files:
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/source/API/SBPlatform.cpp
lldb/source/Commands/CommandObjectPlatform.cpp
lldb/source/Commands/CommandObjectPlatform.h
lldb/source/Plugins/Platform/scripted/ScriptedPlatform.cpp
lldb/source/Plugins/Platform/scripted/ScriptedPlatform.h
lldb/source/Target/Platform.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142266.491011.patch
Type: text/x-patch
Size: 22738 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230121/20fffd38/attachment-0001.bin>
More information about the lldb-commits
mailing list