diff --git a/lldb/bindings/python/python-swigsafecast.swig b/lldb/bindings/python/python-swigsafecast.swig index 7a4f7e81f1cc3..429baad158ca5 100644 --- a/lldb/bindings/python/python-swigsafecast.swig +++ b/lldb/bindings/python/python-swigsafecast.swig @@ -23,6 +23,11 @@ PythonObject SWIGBridge::ToSWIGWrapper(lldb::ProcessSP process_sp) { SWIGTYPE_p_lldb__SBProcess); } +PythonObject SWIGBridge::ToSWIGWrapper(lldb::ModuleSP module_sp) { + return ToSWIGHelper(new lldb::SBModule(std::move(module_sp)), + SWIGTYPE_p_lldb__SBModule); +} + PythonObject SWIGBridge::ToSWIGWrapper(lldb::ThreadPlanSP thread_plan_sp) { return ToSWIGHelper(new lldb::SBThreadPlan(std::move(thread_plan_sp)), SWIGTYPE_p_lldb__SBThreadPlan); diff --git a/lldb/include/lldb/API/SBModule.h b/lldb/include/lldb/API/SBModule.h index 7200a1ef53fd8..85332066ee687 100644 --- a/lldb/include/lldb/API/SBModule.h +++ b/lldb/include/lldb/API/SBModule.h @@ -301,9 +301,12 @@ class LLDB_API SBModule { friend class SBFrame; friend class SBSection; friend class SBSymbolContext; + friend class SBPlatform; friend class SBTarget; friend class SBType; + friend class lldb_private::python::SWIGBridge; + explicit SBModule(const lldb::ModuleSP &module_sp); ModuleSP GetSP() const; diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h b/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h index 518a478af5f6a..0f0e4a563e8b2 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h @@ -84,6 +84,7 @@ class SWIGBridge { static PythonObject ToSWIGWrapper(lldb::ValueObjectSP value_sp); static PythonObject ToSWIGWrapper(lldb::TargetSP target_sp); static PythonObject ToSWIGWrapper(lldb::ProcessSP process_sp); + static PythonObject ToSWIGWrapper(lldb::ModuleSP module_sp); static PythonObject ToSWIGWrapper(lldb::ThreadPlanSP thread_plan_sp); static PythonObject ToSWIGWrapper(lldb::BreakpointSP breakpoint_sp); static PythonObject ToSWIGWrapper(Status &&status);