File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
lldb/bindings/python/static-binding Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -5895,6 +5895,28 @@ bool lldb_private::python::SWIGBridge::LLDBSWIGPythonRunScriptKeywordValue(
58955895 return true;
58965896}
58975897
5898+ bool lldb_private::python::SWIGBridge::LLDBSwigPythonCallModuleNewTarget(
5899+ const char *python_module_name, const char *session_dictionary_name,
5900+ lldb::TargetSP target_sp) {
5901+ std::string python_function_name_string = python_module_name;
5902+ python_function_name_string += ".__lldb_module_added_to_target";
5903+ const char *python_function_name = python_function_name_string.c_str();
5904+
5905+ PyErr_Cleaner py_err_cleaner(true);
5906+
5907+ auto dict = PythonModule::MainModule().ResolveName<PythonDictionary>(
5908+ session_dictionary_name);
5909+ auto pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(
5910+ python_function_name, dict);
5911+
5912+ if (!pfunc.IsAllocated())
5913+ return true;
5914+
5915+ pfunc(SWIGBridge::ToSWIGWrapper(std::move(target_sp)), dict);
5916+
5917+ return true;
5918+ }
5919+
58985920bool lldb_private::python::SWIGBridge::LLDBSwigPythonCallModuleInit(
58995921 const char *python_module_name, const char *session_dictionary_name,
59005922 lldb::DebuggerSP debugger) {
You can’t perform that action at this time.
0 commit comments