There is a gdb extension "libpython.py" within Python sources, it could print Python frame, locals/globals variable, Python sources in GDB. But it couldn't set breakpoints in Python scripts directly. Finally, I decided to write a debugger to extend GDB could debug Python scripts line by line, just like debugging c/c++.
This project is published in github, https://jondy.github.io/pyddd The purpose of this project is to debug Python scripts line by line as debug C/C++ in GDB, so that we can easily debug Python scripts and C/C++ extensions within GDB. -- https://mail.python.org/mailman/listinfo/python-list