How to use pdb to debug a module written in C?

I use pdb to debug a python program, and the python program uses a module written by C. I want to use the "step" command to enter a function in a module written by C, but I find that this operation canโ€™t be successful. Is there a way to use pdb debugging module written by C? Thanks in advance!

+4
source share
1 answer

pdb will not allow you to debug modules written in C. However, you can use gdb to debug errors that may occur in C code.

To run a Python script using gdb , you can use the following command:

 gdb python 

and then execute the script:

 (gdb) run <myscript>.py 
+3
source

Source: https://habr.com/ru/post/1479845/


All Articles