GDBINIT(5)
π GDBINIT(5) π
okay bestie so this is a page from the GNU Development Tools manual, and it's literally just about the little startup scripts that make GDB feel like home. it's giving "get ready with me" but for your debugger π
β¨ NAME β¨
gdbinit β GDB initialization scripts. that's it. that's the whole vibe π«Ά
πΈ SYNOPSIS πΈ
~/.config/gdb/gdbinit
~/.gdbinit
./.gdbinit
those are your three little possible homes, bestie π β¨
π¦ DESCRIPTION π¦
so these files contain GDB commands that just... automatically execute during GDB startup. no typing, no thinking, they simply happen. main character energy fr fr π
the lines of contents are canned sequences of commands, and they're described in the GDB manual in node "Sequences" β you can peek at it with the shell command:
info -f gdb -n Sequences
also pls read more in the GDB manual in node "Startup" β shell command:
info -f gdb -n Startup
okay now here's the lineup of the actual files, in order π
- (not enabled with
--with-system-gdbinitduring compilation) β this is the system-wide initialization file. it gets executed unless the user specified the GDB option-nxor-n. see more in the GDB manual in node"System-wide configuration"β shell commandinfo -f gdb -n 'System-wide configuration'. ngl, this one only shows up if your build was compiled with that flag π«Ά - (not enabled with
--with-system-gdbinit-dirduring compilation) β system-wide initialization directory. every file in this directory gets executed on startup unless the user specified the GDB option-nxor-n, as long as they have a recognized file extension. same deal β see more in the GDB manual in node"System-wide configuration"β shell commandinfo -f gdb -n 'System-wide configuration'. the extension rule is lowkey important, don't sleep on it π§ ~/.config/gdb/gdbinitor~/.gdbinitβ this is your user initialization file, the personal one, the one that's literally about you π it's executed unless the user specified GDB options-nx,-nor-nh. note the extra-nhhere, bestie, it's doing its own thing β¨.gdbinitβ the initialization file for the current directory. lowkey it might need to be enabled with the GDB security commandset auto-load local-gdbinitfirst. see more in the GDB manual in node"Init File in the Current Directory"β shell commandinfo -f gdb -n 'Init File in the Current Directory'. security command, so like... it's a whole thing π
heads up: those-nx,-nand-nhflags are literally the "not me reading my own config" options β if you pass them, the corresponding file gets skipped. that's not a bug, that's the point π
π OPTIONS π
okay so this section is empty. like, genuinely. nothing here. a beautiful empty little void π³οΈβ¨ (the flags are all described up in DESCRIPTION, iykyk)
π ENVIRONMENT π
also empty bestie π nothing to report. no env vars live here. we move.
β SEE ALSO β
gdb(1),"info -f gdb -n Startup"
the full documentation for GDB is maintained as a Texinfo manual. if the info and gdb programs and GDB's Texinfo documentation are all properly installed at your site, then this command:
info gdb
should give you access to the complete manual. slay π
also gotta shout out Using GDB: A Guide to the GNU Source-Level Debugger, by Richard M. Stallman and Roland H. Pesch, July 1991 β vintage icon behavior π
π COPYRIGHT π
Copyright (c) 1988-2026 Free Software Foundation, Inc.
permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "Free Software" and "Free Software Needs Free Documentation", with the Front-Cover Texts being "A GNU Manual," and with the Back-Cover Texts as in (a) below.
(a) The FSF's Back-Cover Text is: "You are free to copy and modify this GNU Manual. Buying copies from GNU Press supports the FSF in developing GNU and promoting software freedom."
and that's the whole page, bestie π this was gdb-18.1, dated 2026-09-25 β go forth and let your .gdbinit cook πβ¨π¦
π¦ where this page comes from
- arch rolling: gdb 18.1-1 Β· GPL-3.0-or-later AND LGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms