summaryrefslogtreecommitdiffstats
path: root/lldb/examples/python/cmdtemplate.py
Commit message (Collapse)AuthorAgeFilesLines
* Python 2/3 compatibility: from __future__ import print_functionSerge Guelton2019-03-211-4/+6
| | | | | | Differential Revision: https://reviews.llvm.org/D59580 llvm-svn: 356695
* Update cmdtemplate.py to use best pratices.Greg Clayton2018-06-221-53/+78
| | | | | | | | | | Fixes include: - fix all lint errors - add code that will automatically register and LLDB command classes by detecting the classes and any classes that have a "register_lldb_command" function - automatically fill in the correct module name when registering commands - automatically fill in the class name when registering command llvm-svn: 335401
* Modernize the example cmdtemplate.py.Jim Ingham2017-10-311-85/+95
| | | | | | | | This version relies on a newer and more convenient way to use a class to implement a command. It has been in place since early 2015, so it should be pretty safe to use. llvm-svn: 317043
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-061-17/+53
| | | | | | | | | | | | | | | | | | | | | | | *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
* Tweaks to the Python reference and example command to use the preferred ↵Enrico Granata2013-07-111-5/+5
| | | | | | print style and the (finally available :-) SetError API llvm-svn: 186122
* Providing a more interesting command template for LLDBEnrico Granata2013-05-091-25/+41
| | | | | | This one actually exploits the SB API to obtain information about your inferior process llvm-svn: 181500
* Being explicit about how ignoring optparse's exceptions is not a best principleEnrico Granata2013-02-251-0/+2
| | | | llvm-svn: 176059
* Mark the command as failed if parsing fails.Jim Ingham2013-02-211-0/+1
| | | | llvm-svn: 175776
* Modified the command template to include best practices.Greg Clayton2012-09-131-17/+24
| | | | llvm-svn: 163773
* Added a 'gdbremote' python module that adds two commands: start_gdb_log and ↵Greg Clayton2012-01-261-4/+4
| | | | | | | | | | | | | | | end_gdb_log. When this is imported into your lldb using the "command script import /path/to/gdbremote.py" these new commands are available within LLDB. 'start_gdb_log' will enable logging with timestamps for GDB remote packets, and 'stop_gdb_log' will then dump the details and also a lot of packet timing data. This allows us to accurately track what packets are taking up the most time when debugging (when using the ProcessGDBRemote debugging plug-in). Also udpated the comments at the top of the cmdtemplate.py to show how to correctly import the module from within LLDB. llvm-svn: 149030
* Proof-reading the python docs.Jim Ingham2012-01-241-5/+6
| | | | llvm-svn: 148768
* Added a python FAQ page with detailed examples of how to add python functionsGreg Clayton2012-01-221-0/+49
to breakpoints, creating new LLDB commands using python modules and also how to run scripts from the command line. llvm-svn: 148650
OpenPOWER on IntegriCloud