If you want to debug cpython's c code, you can use gdb to debug it like this:
When you want to follow the execution steps of the c layer.
$ gdb -- /usr/bin/python
#File name where you want to set the breakpoint:Specify by the number of lines.
(gdb) break bltinmodule.c:1665
#Run script
(gdb) run /usr/bin/nosetests test.py
...
Looking at the following article, I knew that I would do it like this, so a memorandum. (The article uses lldb) http://flowerhack.dreamwidth.org/3594.html?utm_source=Python+Weekly+Newsletter&utm_campaign=b17d7f3658-Python_Weekly_Issue_167_December_4_2014&utm_medium=email&utm_term=0_9e26887fc5-b17d7f3658-312730089
Recommended Posts