summaryrefslogtreecommitdiffstats
path: root/lldb/examples/python/pytracer.py
Commit message (Collapse)AuthorAgeFilesLines
* Python 2/3 compatibility: from __future__ import print_functionSerge Guelton2019-03-211-17/+18
| | | | | | Differential Revision: https://reviews.llvm.org/D59580 llvm-svn: 356695
* Workaround items/iteritems difference between Python2 and Python3Serge Guelton2019-03-211-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D59588 llvm-svn: 356673
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-061-257/+289
| | | | | | | | | | | | | | | | | | | | | | | *** 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
* Adding some LLDB-specific logic to the tracer (in a separate tracer module) ↵Enrico Granata2013-05-071-12/+91
| | | | | | | | to improve the quality of the output when debugging data formatters (more improvements are necessary before this is really legible) llvm-svn: 181367
* First iteration of a Python tracer moduleEnrico Granata2013-05-071-0/+249
This module uses Python's sys.settrace() mechanism so setup a hook that can log every significant operation This is a first step in providing a good debugging experience of Python embedded in LLDB This module comprises an OO infrastructure that wraps Python's tracing and inspecting mechanisms, plus a very simple logging tracer Output from this tracer looks like: call print_keyword_args from <module> @ 243 args are kwargs are {'first_name': 'John', 'last_name': 'Doe'} running print_keyword_args @ 228 locals are {'kwargs': {'first_name': 'John', 'last_name': 'Doe'}} running print_keyword_args @ 229 locals are {'key': 'first_name', 'value': 'John', 'kwargs': {'first_name': 'John', 'last_name': 'Doe'}} first_name = John running print_keyword_args @ 228 locals are {'key': 'first_name', 'value': 'John', 'kwargs': {'first_name': 'John', 'last_name': 'Doe'}} running print_keyword_args @ 229 locals are {'key': 'last_name', 'value': 'Doe', 'kwargs': {'first_name': 'John', 'last_name': 'Doe'}} last_name = Doe running print_keyword_args @ 228 locals are {'key': 'last_name', 'value': 'Doe', 'kwargs': {'first_name': 'John', 'last_name': 'Doe'}} return from print_keyword_args value is None locals are {'key': 'last_name', 'value': 'Doe', 'kwargs': {'first_name': 'John', 'last_name': 'Doe'}} llvm-svn: 181343
OpenPOWER on IntegriCloud