This article shows you how to step into Python extensions, which are often used to wrap C/C++ libraries for interoperability or optimized performance. Because pdb cannot step through Python extensions we opt for gdb instead.
It is common practice in the Python world to write C/C++ extensions to optimize performance, but what do you do when that is not enough? How could you find bottlenecks within your extensions? Use callgrind of course!