id = "gdb" name = "GDB" homepage = "https://www.sourceware.org/gdb/" description = "GDB, the GNU Project debugger, allows you to see what is going on inside another program while it executes." # The archer fish mascot GDB's own page carries. The SVG next to it has no # viewBox, so the raster is the one that scales into an icon slot. icon = "https://www.sourceware.org/gdb/images/archer.jpg" executables = ["gdb"] [dotfiles] # The GDB manual, "Initialization Files" # (https://sourceware.org/gdb/current/onlinedocs/gdb.html/Initialization-Files.html), # gives two lists, and they differ by platform rather than being one location # under several names — so each is written out. # # The main init file, on non-Apple hosts, is the first that exists of # $XDG_CONFIG_HOME/gdb/gdbinit, $HOME/.config/gdb/gdbinit and $HOME/.gdbinit; # the XDG pair is what [configHome] means. On Apple hosts it is # $HOME/Library/Preferences/gdb/gdbinit, then $HOME/.gdbinit — hence # [preferences], which is the macOS-only root. The early init file that runs # before the interpreter is set up has the same two lists with the name # gdbearlyinit. # # On a Mac the [configHome] entries resolve to ~/.config/gdb, which GDB there # does not read; a consumer finds nothing and skips them. paths = [ "~/.gdbinit", "~/.gdbearlyinit", "[configHome]/gdb/gdbinit", "[configHome]/gdb/gdbearlyinit", "[preferences]/gdb/gdbinit", "[preferences]/gdb/gdbearlyinit", ] exclude = [] # Debugger commands. GDB has no credential file. secret = [] # Init files are read once at startup and never written back, so rewriting one # while a session is live only affects the next gdb. side_effect = false # All three take absolute paths that exist on one machine: a safe-path entry # names the checkout whose .gdbinit or -gdb.py GDB is being allowed to # auto-load, and solib-search-path names where that machine's shared libraries # or a sysroot were unpacked. Pretty-printer registrations, `set disassembly # flavor`, history and layout settings are deliberately not marked — those are # the preferences a user wants to follow them. # # All three take paths the user added by hand — the checkout they allowed and # the sysroot they unpacked — so they are kept to set this machine up the same # way again: backup. # # All three spellings of gdbinit are named, or the rule would not run on the # platform whose spelling is missing. [[dotfiles.machine_lines]] file = ["~/.gdbinit", "[configHome]/gdb/gdbinit", "[preferences]/gdb/gdbinit"] match = { prefix = [ "add-auto-load-safe-path", "set auto-load safe-path", "set solib-search-path", ] } scope = "backup"