How do I run a Python script in gdb?
Use the “file” command . Make breakpoint pending on future shared library load? (y or [n]) y Breakpoint 1 (test.py:3) pending. (gdb) run test.py Starting program: /usr/bin/python test.py … … and while the entire Python script does run within gdb , the breakpoint is simply never reached.14 Eyl 2011
Read moreHow do I import gdb into Python?
Explanation
Read moreWhere is Python gdb py?
The script in `Tools/gdb/libpython.py ` has helper functions for debugging Python processes under gdb. When installed to `{exe}-gdb.py` it will automatically be loaded by gdb assuming it is in the safe path.
Read more