summaryrefslogtreecommitdiff
path: root/lldb/examples/python/disasm.py
AgeCommit message (Collapse)Author
2023-05-25[NFC][Py Reformat] Reformat python files in lldbJonas Devlieghere
This is an ongoing series of commits that are reformatting our Python code. Reformatting is done with `black` (23.1.0). If you end up having problems merging this commit because you have made changes to a python file, the best way to handle that is to run `git checkout --ours <yourfile>` and then reformat it with black. RFC: https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style Differential revision: https://reviews.llvm.org/D151460
2020-07-16Harmonize Python shebangserge-sans-paille
Differential Revision: https://reviews.llvm.org/D83857
2019-03-21Python 2/3 compatibility: from __future__ import print_functionSerge Guelton
Differential Revision: https://reviews.llvm.org/D59580 llvm-svn: 356695
2016-09-06*** This commit represents a complete reformatting of the LLDB source codeKate Stone
*** 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
2011-07-15Add usage docstring to SBValue.h, and minor update of docstrings for ↵Johnny Chen
SBValueList.h. llvm-svn: 135230
2011-07-06Remove unnecessary 'import' statement.Johnny Chen
llvm-svn: 134519
2011-05-25Add a little spice to the script to allow us to specify a function name to ↵Johnny Chen
break at and to disassemble. Usage: disasm.py [-n name] executable-image By default, it breaks at and disassembles the 'main' function. llvm-svn: 132090
2011-05-25Add a little twist to the disasm.py script so that it is possible to ↵Johnny Chen
terminate the inferior process by entering 'Ctrl-D' or 'quit'. llvm-svn: 132088
2011-05-25Modified to use SBTarget.LaunchSimple() API.Johnny Chen
llvm-svn: 132082
2011-05-25Use built-in truth value testing.Johnny Chen
llvm-svn: 132079
2011-04-28Modified to take advantage of the iteration protocol for our lldb container ↵Johnny Chen
objects. llvm-svn: 130456
2011-03-30The example had gotten stale, so I made it work again, and for fun printed ↵Jim Ingham
out the frame registers as well. llvm-svn: 128523
2010-10-15There's no need to explicitly call lldb.SBDebugger.Initialize() now. It is doneJohnny Chen
when importing the lldb module. llvm-svn: 116585
2010-10-09Minor change.Johnny Chen
llvm-svn: 116127
2010-10-07Cleaned up the SWIG stuff so all includes happen as they should, no pullingGreg Clayton
tricks to get types to resolve. I did this by correctly including the correct files: stdint.h and all lldb-*.h files first before including the API files. This allowed me to remove all of the hacks that were in the lldb.swig file and it also allows all of the #defines in lldb-defines.h and enumerations in lldb-enumerations.h to appear in the lldb.py module. This will make the python script code a lot more readable. Cleaned up the "process launch" command to not execute a "process continue" command, it now just does what it should have with the internal API calls instead of executing another command line command. Made the lldb_private::Process set the state to launching and attaching if WillLaunch/WillAttach return no error respectively. llvm-svn: 115902
2010-10-06Fixed a few issues with the example script.Greg Clayton
llvm-svn: 115801
2010-10-06Added the first of hopefully many python example scripts that show how toGreg Clayton
use the python API that is exposed through SWIG to do some cool stuff. Also fixed synchronous debugging so that all process control APIs exposed through the python API will now wait for the process to stop if you set the async mode to false (see disasm.py). llvm-svn: 115738