Fix an issue where the @lldb.command marker would not work with the new 5-argument version of the Python command function
This: a) teaches PythonCallable to look inside a callable object b) teaches PythonCallable to discover whether a callable method is bound c) teaches lldb.command to dispatch to either the older 4 argument version or the newer 5 argument version llvm-svn: 273640
This commit is contained in:
@@ -610,7 +610,7 @@ LLDBSwigPythonCallCommand
|
||||
PythonObject exe_ctx_arg(PyRefType::Owned, SBTypeToSWIGWrapper(exe_ctx_sb));
|
||||
PythonObject cmd_retobj_arg(PyRefType::Owned, SBTypeToSWIGWrapper(&cmd_retobj_sb));
|
||||
|
||||
if (argc.count == 5 || argc.has_varargs)
|
||||
if (argc.count == 5 || argc.is_bound_method || argc.has_varargs)
|
||||
pfunc(debugger_arg, PythonString(args), exe_ctx_arg, cmd_retobj_arg, dict);
|
||||
else
|
||||
pfunc(debugger_arg, PythonString(args), cmd_retobj_arg, dict);
|
||||
|
||||
Reference in New Issue
Block a user