Python (Debugging with GDB) – sourceware.org

Python scripts used by GDB should be installed in data-directory/python, where data-directory is the data directory as determined at GDB startup (see Data Files). This directory, known as the python directory, is automatically added to the Python Search Path in order to allow the Python interpreter to locate all scripts installed at this location.

Read More