[lldb] Add conversions for SBValueList and SBValue to the python bridge. (#178574)

This patch adds support for:
- PyObject -> SBValueList (which was surprisingly not there before!)
- PyObject -> SBValue
- SBValue -> ValueObjectSP using the ScriptInterpreter

These three are the main remaining plumbing changes necessary before we can get to the meat of actually using ScriptedFrame to provide values to the printer/etc. Future patches build off this change in order to allow ScriptedFrames to provide variables and get values for variable expressions.
This commit is contained in:
Aman LaChapelle authored and GitHub committed 2026-01-29 11:38:50 -08:00
1 parent 75f03a62d1
commit 8122d0e4bc
7 files changed
+81

No files matched your search

@@ -656,6 +656,10 @@ protected:
return python::SWIGBridge::ToSWIGWrapper(arg);
}
python::PythonObject Transform(lldb::ValueObjectSP arg) {
return python::SWIGBridge::ToSWIGWrapper(arg);
}
template <typename T, typename U>
void ReverseTransform(T &original_arg, U transformed_arg, Status &error) {
// If U is not a PythonObject, don't touch it!
@@ -814,6 +818,16 @@ lldb::StackFrameListSP
ScriptedPythonInterface::ExtractValueFromPythonObject<lldb::StackFrameListSP>(
python::PythonObject &p, Status &error);
template <>
lldb::ValueObjectSP
ScriptedPythonInterface::ExtractValueFromPythonObject<lldb::ValueObjectSP>(
python::PythonObject &p, Status &error);
template <>
lldb::ValueObjectListSP
ScriptedPythonInterface::ExtractValueFromPythonObject<lldb::ValueObjectListSP>(
python::PythonObject &p, Status &error);
} // namespace lldb_private
#endif // LLDB_ENABLE_PYTHON