diff options
| author | Aman LaChapelle <aman.lachapelle@gmail.com> | 2026-01-29 11:38:50 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-29 11:38:50 -0800 |
| commit | 8122d0e4bc8b536e0bb6bb5fae97e8216986ee28 (patch) | |
| tree | 18e6a0f949d12effad947a4886b279d6c6a56f20 /lldb/bindings/python | |
| parent | 75f03a62d1f9b0081fff57ceebb29a3ae1560a61 (diff) | |
| download | llvm-8122d0e4bc8b536e0bb6bb5fae97e8216986ee28.tar.gz llvm-8122d0e4bc8b536e0bb6bb5fae97e8216986ee28.tar.bz2 llvm-8122d0e4bc8b536e0bb6bb5fae97e8216986ee28.zip | |
[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.
Diffstat (limited to 'lldb/bindings/python')
| -rw-r--r-- | lldb/bindings/python/python-wrapper.swig | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lldb/bindings/python/python-wrapper.swig b/lldb/bindings/python/python-wrapper.swig index 0ba152166522..bf5956992047 100644 --- a/lldb/bindings/python/python-wrapper.swig +++ b/lldb/bindings/python/python-wrapper.swig @@ -545,6 +545,18 @@ void *lldb_private::python::LLDBSWIGPython_CastPyObjectToSBValue(PyObject * data return sb_ptr; } +void *lldb_private::python::LLDBSWIGPython_CastPyObjectToSBValueList(PyObject * data) { + lldb::SBValueList *sb_ptr = NULL; + + int valid_cast = + SWIG_ConvertPtr(data, (void **)&sb_ptr, SWIGTYPE_p_lldb__SBValueList, 0); + + if (valid_cast == -1) + return NULL; + + return sb_ptr; +} + void *lldb_private::python::LLDBSWIGPython_CastPyObjectToSBMemoryRegionInfo(PyObject * data) { lldb::SBMemoryRegionInfo *sb_ptr = NULL; |
