SuccessChanges

Summary

  1. [LLDB] bugfix: command script add -f doesn't work for some callables (details)
  2. convert LLDBSwigPythonCallTypeScript to ArgInfo::max_positional_args (details)
Commit 2386537c2469a97501a305c6b3138231b907a67f by lawrence_danna
[LLDB] bugfix: command script add -f doesn't work for some callables
Summary: When users define a debugger command from python, they provide
a callable object.   Because the signature of the function has been
extended, LLDB needs to inspect the number of parameters the callable
can take.
The rule it was using to decide was weird, apparently not tested, and
giving wrong results for some kinds of python callables.
This patch replaces the weird rule with a simple one: if the callable
can take 5 arguments, it gets the 5 argument version of the signature.
Otherwise it gets the old 4 argument version.
It also adds tests with a bunch of different kinds of python callables
with both 4 and 5 arguments.
Reviewers: JDevlieghere, clayborg, labath, jingham
Reviewed By: labath
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D69014
llvm-svn: 375333
The file was modifiedlldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp (diff)
The file was modifiedlldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp (diff)
The file was addedlldb/packages/Python/lldbsuite/test/commands/command/script/callables.py
The file was modifiedlldb/scripts/Python/python-wrapper.swig (diff)
The file was modifiedlldb/packages/Python/lldbsuite/test/commands/command/script/py_import (diff)
The file was modifiedlldb/packages/Python/lldbsuite/test/commands/command/script/TestCommandScript.py (diff)
The file was modifiedlldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h (diff)
Commit bdcad0aca0a05145364ee153a8f54af4aea2c445 by lawrence_danna
convert LLDBSwigPythonCallTypeScript to ArgInfo::max_positional_args
Summary: This patch converts another user of ArgInfo::count over to use
ArgInfo::max_positional_args instead.   I also add a test to make sure
both documented signatures for python type formatters work.
Reviewers: JDevlieghere, clayborg, labath, jingham
Reviewed By: labath
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D69153
llvm-svn: 375334
The file was modifiedlldb/packages/Python/lldbsuite/test/commands/expression/formatters/TestFormatters.py (diff)
The file was modifiedlldb/scripts/Python/python-wrapper.swig (diff)
The file was modifiedlldb/packages/Python/lldbsuite/test/commands/expression/formatters/formatters.py (diff)