llvm-project/lldb/scripts/Python
Dave Lee 8ab5c2db8a Fix and simplify lldb.command decorator
Summary:
This change fixes one issue with `lldb.command`, and also reduces the implementation.

The fix: a command function's docstring was not shown when running `help <command_name>`. This is because the docstring attached the source function is not propagated to the decorated function (`f.__call__`). By returning the original function, the docstring will be properly displayed by `help`.

Also with this change, the command name is assumed to be the function's name, but can still be explicitly defined as previously.

Additionally, the implementation was updated to:

* Remove inner class
* Remove use of `inspect` module
* Remove `*args` and `**kwargs`

Reviewers: clayborg

Reviewed By: clayborg

Subscribers: keith, xiaobai, lldb-commits

Differential Revision: https://reviews.llvm.org/D48658

llvm-svn: 336287
2018-07-04 16:11:43 +00:00
..
android *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
modules Python: adjust the include directories 2018-06-04 02:08:12 +00:00
finish-swig-Python-LLDB.sh [CMake] Rename lldb-launcher to darwin-debug 2016-10-27 22:51:41 +00:00
finishSwigPythonLLDB.py Install six.py conditionally 2017-02-04 00:20:24 +00:00
modify-python-lldb.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
prepare_binding_Python.py Fix broken escaping of commands in the build 2016-12-16 16:38:25 +00:00
python-extensions.swig Fix and simplify lldb.command decorator 2018-07-04 16:11:43 +00:00
python-swigsafecast.swig Make breakpoint names real entities. 2017-09-14 20:22:49 +00:00
python-typemaps.swig Change SBProcess::ReadCStringFromMemory() back to returning 2017-12-22 03:27:02 +00:00
python-wrapper.swig Fix a python object leak in SWIG glue. 2017-06-21 01:52:37 +00:00
remote-build.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00
use_lldb_suite.py *** This commit represents a complete reformatting of the LLDB source code 2016-09-06 20:57:50 +00:00