[issue25571] Improve the lltrace feature with the Py_Debug mode

Stéphane Wirtel report at bugs.python.org
Sat Jul 16 06:17:33 EDT 2016


Stéphane Wirtel added the comment:

Here is a small example of lltrace when you enable it.

```
stephane at sg1 ~/s/h/cpython> ./python 
Python 3.6.0a3+ (default:0d8f139a6e19+, Jul 16 2016, 11:59:46) 
[GCC 6.1.1 20160621 (Red Hat 6.1.1-3)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> print
<built-in function print>
>>> print("hello")
hello
>>> __ltrace__ = None
>>> print("hello")
0: LOAD_NAME, 0
push <built-in function print>
2: LOAD_CONST, 0
push 'hello'
4: CALL_FUNCTION, 1
ext_pop 'hello'
hello
ext_pop <built-in function print>
push None
6: PRINT_EXPR
pop None
8: LOAD_CONST, 1
push None
10: RETURN_VALUE
pop None
>>> del __ltrace__
0: DELETE_NAME, 0
2: LOAD_CONST, 0
push None
4: RETURN_VALUE
pop None
>>> print("hello")
hello
>>> print("hello")
```

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25571>
_______________________________________


More information about the Python-bugs-list mailing list