This is the most important tool for debugging python code running on the c stack! Since gdb 7, the cpython source includes a python script (tools/gdb/libpython. py) that extends gdb's capabilities. Debug cpython with gdb ¶ python built in debug mode is abi compatible with python built in release mode since python 3. 8:

Current python thread … Gdb automatically import s the gdb module for use in all scripts evaluated by the python command. Some types of the gdb module come with a textual representation (accessible through the repr or str … This document explains how the python gdb extension, python-gdb. py, can be used with the gdb debugger to debug cpython extensions and the cpython interpreter itself. When debugging low …

When debugging low …