gdb: Python

 
 23.2 Extending GDB using Python
 ===============================
 
 You can extend GDB using the Python programming language
 (http://www.python.org/).  This feature is available only if GDB was
 configured using '--with-python'.  GDB can be built against either
 Python 2 or Python 3; which one you have depends on this configure-time
 option.
 
    Python scripts used by GDB should be installed in
 'DATA-DIRECTORY/python', where DATA-DIRECTORY is the data directory as
 determined at GDB startup (SeeData 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.
 
    Additionally, GDB commands and convenience functions which are
 written in Python and are located in the
 'DATA-DIRECTORY/python/gdb/command' or
 'DATA-DIRECTORY/python/gdb/function' directories are automatically
 imported when GDB starts.
 

Menu