Next: , Previous: Python, Up: Extending GDB


23.3 Auto-loading extensions

gdb provides two mechanisms for automatically loading extensions when a new object file is read (for example, due to the file command, or because the inferior has loaded a shared library): objfile-gdb.ext and the .debug_gdb_scripts section of modern file formats like ELF.

The auto-loading feature is useful for supplying application-specific debugging commands and features.

Auto-loading can be enabled or disabled, and the list of auto-loaded scripts can be printed. See the ‘auto-loading’ section of each extension language for more information. For gdb command files see Auto-loading sequences. For Python files see Python Auto-loading.

Note that loading of this script file also requires accordingly configured auto-load safe-path (see Auto-loading safe path).