granata.enrico added a comment. One alternative would be to have the num_children method on the synthetic provider itself be able to take an optional argument that is the max_count. That is, instead of defining
def num_children(self): .. You would instead define def num_children(self, max_count): .. Of course, you would need to continue supporting both possible signatures in order to maintain compatibility with existing formatters. But we do have some support for that. If you look at LLDBSwigPythonCallCommand: PyCallable::argc argc = pfunc.GetNumArguments(); if (argc.num_args == 5 || argc.varargs == true) pvalue = pfunc(debugger_sb, args, exe_ctx_sb, &cmd_retobj_sb, session_dict = FindSessionDictionary(session_dictionary_name)); else pvalue = pfunc(debugger_sb, args, &cmd_retobj_sb, session_dict = FindSessionDictionary(session_dictionary_name)); num_children could start doing something similar for 1 vs. 2 arguments http://reviews.llvm.org/D13778 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits