Changes to Python commands:
- They now have an SBCommandReturnObject instead of an SBStream as third argument
- The class CommandObjectPythonFunction has been merged into CommandObjectCommands.cpp
- The command to manage them is now:
command script with subcommands add, list, delete, clear
command alias is returned to its previous functionality
- Python commands are now part of an user dictionary, instead of being seen as aliases
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137785 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/scripts/Python/python-wrapper.swig b/scripts/Python/python-wrapper.swig
index 0843af1..0269104 100644
--- a/scripts/Python/python-wrapper.swig
+++ b/scripts/Python/python-wrapper.swig
@@ -590,19 +590,21 @@
lldb::DebuggerSP& debugger,
const char* args,
std::string& err_msg,
- lldb::SBStream& stream
+ lldb_private::CommandReturnObject& cmd_retobj
)
{
+ not_owning_ap<lldb_private::CommandReturnObject> auto_cmd_retobj(&cmd_retobj);
+
bool retval = false;
PyObject *DebuggerObj_PyObj = SWIG_NewPointerObj((void *) &debugger, SWIGTYPE_p_lldb__SBDebugger, 0);
- PyObject *StreamObj_PyObj = SWIG_NewPointerObj((void *) &stream, SWIGTYPE_p_lldb__SBStream, 0);
+ PyObject *CmdRetObj_PyObj = SWIG_NewPointerObj((void *) &auto_cmd_retobj, SWIGTYPE_p_lldb__SBCommandReturnObject, 0);
if (DebuggerObj_PyObj == NULL)
return retval;
- if (StreamObj_PyObj == NULL)
+ if (CmdRetObj_PyObj == NULL)
return retval;
if (!python_function_name || !session_dictionary_name)
@@ -676,7 +678,7 @@
PyTuple_SetItem (pargs, 0, DebuggerObj_PyObj); // This "steals" a reference to DebuggerObj_PyObj
PyTuple_SetItem (pargs, 1, PyString_FromString(args));
- PyTuple_SetItem (pargs, 2, StreamObj_PyObj); // This "steals" a reference to StreamObj_PyObj
+ PyTuple_SetItem (pargs, 2, CmdRetObj_PyObj); // This "steals" a reference to CmdRetObj_PyObj
PyTuple_SetItem (pargs, 3, session_dict); // This "steals" a reference to session_dict
pvalue = PyObject_CallObject (pfunc, pargs);
Py_DECREF (pargs);