[Lldb-commits] [PATCH] D155161: [lldb] Convert script native types to StructuredData counterpart
Med Ismail Bennani via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Jul 13 01:37:42 PDT 2023
mib created this revision.
mib added reviewers: jingham, JDevlieghere, bulbazord.
mib added a project: LLDB.
Herald added a project: All.
mib requested review of this revision.
Herald added a subscriber: lldb-commits.
This patch adds the ability to pass native types from the script
interpreter to methods that use a {SB,}StructuredData argument.
To do so, this patch introduce a new `ScriptedTypedObject` struture that
holds the pointer to the script object as well as the originating script
interpreter language.
This structure allows the debugger to parse the script object and
convert it to a StructuredData object.
This patch also adds a SWIG typemap that checks the input argument to
ensure it's either an SBStructuredData object, in which case it just
passes it throught, or a python object that is NOT another SB type, to
provide some guardrails for the user.
rdar://111467140
Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D155161
Files:
lldb/bindings/python/python-typemaps.swig
lldb/include/lldb/API/SBDebugger.h
lldb/include/lldb/API/SBDefines.h
lldb/include/lldb/API/SBStructuredData.h
lldb/include/lldb/Core/StructuredDataImpl.h
lldb/include/lldb/Interpreter/ScriptInterpreter.h
lldb/source/API/SBDebugger.cpp
lldb/source/API/SBStructuredData.cpp
lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
lldb/test/API/python_api/sbstructureddata/TestStructuredDataAPI.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155161.539891.patch
Type: text/x-patch
Size: 11259 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230713/ead66533/attachment.bin>
More information about the lldb-commits
mailing list