diff options
Diffstat (limited to 'lldb/scripts/Python/python-wrapper.swig')
-rw-r--r-- | lldb/scripts/Python/python-wrapper.swig | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lldb/scripts/Python/python-wrapper.swig b/lldb/scripts/Python/python-wrapper.swig index cd133cfa8a2..4ab27a9935e 100644 --- a/lldb/scripts/Python/python-wrapper.swig +++ b/lldb/scripts/Python/python-wrapper.swig @@ -713,6 +713,30 @@ LLDBSWIGPythonCreateOSPlugin Py_RETURN_NONE; } +SWIGEXPORT void* +LLDBSWIGPython_GDBPluginGetDynamicSetting (void* module, const char* setting, const lldb::TargetSP& target_sp) +{ + + if (!module || !setting) + Py_RETURN_NONE; + + lldb::SBTarget target_sb(target_sp); + + PyObject *pvalue = NULL; + + { + PyErr_Cleaner py_err_cleaner(true); + PyCallable pfunc = PyCallable::FindWithFunctionName("get_dynamic_setting",(PyObject *)module); + + if (!pfunc) + Py_RETURN_NONE; + + pvalue = pfunc(target_sb, setting); + } + + return pvalue; +} + SWIGEXPORT bool LLDBSWIGPythonRunScriptKeywordProcess (const char* python_function_name, |