How to debug python script in C level using GDB. Give me a simple example for this
See the thing is for binary(.so) files, you surely cannot apply breakpoint to a particular line, but surely you can apply breakpoint to a function. Say using
(gdb) b func_name
you can easily apply breakpoint to a function and thereby obtain the backtrace whenever the breakpoint is found. First run your python sc
Start gdb:
gdb -ex r --args python demo.py
Apply breakpoint:
(gdb) b func_name
Run:
(gdb) run
This should work for your case.