When a new object file is read (for example, due to the
command, or because the inferior has loaded a shared library),
gdb will look for Python support scripts in several ways:
The auto-loading feature is useful for supplying application-specific debugging commands and scripts.
maint set python auto-load [yes|no]
- Enable or disable the Python auto-loading feature.
maint show python auto-load
- Show whether Python auto-loading is enabled or disabled.
When reading an auto-loaded file, gdb sets the
current objfile. This is available via the
function (see Objfiles In Python). This can be useful for
registering objfile-specific pretty-printers.