================
@@ -831,6 +831,37 @@ bool 
lldb_private::python::SWIGBridge::LLDBSwigPythonCallCommandObject(
   return true;
 }
 
+bool lldb_private::python::SWIGBridge::LLDBSwigPythonCallParsedCommandObject(
+    PyObject *implementor, lldb::DebuggerSP debugger, 
lldb_private::StructuredDataImpl &args_impl,
+    lldb_private::CommandReturnObject &cmd_retobj,
+    lldb::ExecutionContextRefSP exe_ctx_ref_sp) {
+
+  PyErr_Cleaner py_err_cleaner(true);
+
+  PythonObject self(PyRefType::Borrowed, implementor);
+  auto pfunc = self.ResolveName<PythonCallable>("__call__");
----------------
jimingham wrote:

We don't do any checking for arguments in any of the `pfunc` lookups in the 
python wrapper, except in one or two cases where we support overloaded 
implementation functions.  I don't think doing this piecemeal is a great idea.  
It would be better to have some kind of `check_pfunc` feature that does the 
lookup and takes some specification about what to expect of the found function. 
 Then we can insert this in all the current lookups.
But this patch is long enough already, it would be better to do that as a 
separate patch.

https://github.com/llvm/llvm-project/pull/70734
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to