[all-commits] [llvm/llvm-project] b05a5d: [lldb/script] Migrate synthetic children providers...

Med Ismail Bennani via All-commits all-commits at lists.llvm.org
Thu Jul 30 13:39:57 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b05a5d09547bea535b4c26ee522ce310db118c47
      https://github.com/llvm/llvm-project/commit/b05a5d09547bea535b4c26ee522ce310db118c47
  Author: Med Ismail Bennani <ismail at bennani.ma>
  Date:   2026-07-30 (Thu, 30 Jul 2026)

  Changed paths:
    M lldb/bindings/python/CMakeLists.txt
    M lldb/bindings/python/python-swigsafecast.swig
    M lldb/bindings/python/python-wrapper.swig
    M lldb/docs/CMakeLists.txt
    A lldb/examples/python/templates/scripted_synthetic_children.py
    M lldb/include/lldb/API/SBPlatform.h
    M lldb/include/lldb/DataFormatters/TypeSynthetic.h
    A lldb/include/lldb/Interpreter/Interfaces/ScriptedSyntheticChildrenInterface.h
    M lldb/include/lldb/Interpreter/ScriptInterpreter.h
    M lldb/include/lldb/lldb-enumerations.h
    M lldb/include/lldb/lldb-forward.h
    M lldb/source/DataFormatters/TypeSynthetic.cpp
    M lldb/source/Interpreter/ScriptInterpreter.cpp
    M lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
    M lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptInterpreterPythonInterfaces.cpp
    M lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptInterpreterPythonInterfaces.h
    M lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h
    A lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedSyntheticChildrenPythonInterface.cpp
    A lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedSyntheticChildrenPythonInterface.h
    M lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h
    M lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
    M lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
    M lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp

  Log Message:
  -----------
  [lldb/script] Migrate synthetic children providers onto ScriptedPythonInterface (#210845)

Give `type synthetic add -l` a formal
`ScriptedSyntheticChildrenInterface`, matching the architecture used
elsewhere in this series: a C++ interface header, a Python-backed
implementation, `PluginManager` registration with CLI/API usages, and a
generatable ABC template (`scripted_synthetic_children.py`) wired into
`scripting extension generate`.

Every method goes through the shared `Dispatch<T>()` machinery instead
of hand-rolling its own Locker/raw-SWIG calls. `Dispatch<T>()` is taught
to introspect the target method's arity via
`PythonCallable::GetArgInfo()` and drop trailing args before calling, so
providers that legitimately define an argument as optional
(`num_children(self)` vs. `num_children(self, max_count)`) still work
through the generic dispatch path.

This retires the ad-hoc `LLDBSwigPython_*` synthetic-children bridge
functions entirely.

Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list