| 1 |
.\" -*- mode: troff; coding: utf-8 -*- |
| 2 |
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45) |
| 3 |
.\" |
| 4 |
.\" Standard preamble: |
| 5 |
.\" ======================================================================== |
| 6 |
.de Sp \" Vertical space (when we can't use .PP) |
| 7 |
.if t .sp .5v |
| 8 |
.if n .sp |
| 9 |
.. |
| 10 |
.de Vb \" Begin verbatim text |
| 11 |
.ft CW |
| 12 |
.nf |
| 13 |
.ne \\$1 |
| 14 |
.. |
| 15 |
.de Ve \" End verbatim text |
| 16 |
.ft R |
| 17 |
.fi |
| 18 |
.. |
| 19 |
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. |
| 20 |
.ie n \{\ |
| 21 |
. ds C` "" |
| 22 |
. ds C' "" |
| 23 |
'br\} |
| 24 |
.el\{\ |
| 25 |
. ds C` |
| 26 |
. ds C' |
| 27 |
'br\} |
| 28 |
.\" |
| 29 |
.\" Escape single quotes in literal strings from groff's Unicode transform. |
| 30 |
.ie \n(.g .ds Aq \(aq |
| 31 |
.el .ds Aq ' |
| 32 |
.\" |
| 33 |
.\" If the F register is >0, we'll generate index entries on stderr for |
| 34 |
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index |
| 35 |
.\" entries marked with X<> in POD. Of course, you'll have to process the |
| 36 |
.\" output yourself in some meaningful fashion. |
| 37 |
.\" |
| 38 |
.\" Avoid warning from groff about undefined register 'F'. |
| 39 |
.de IX |
| 40 |
.. |
| 41 |
.nr rF 0 |
| 42 |
.if \n(.g .if rF .nr rF 1 |
| 43 |
.if (\n(rF:(\n(.g==0)) \{\ |
| 44 |
. if \nF \{\ |
| 45 |
. de IX |
| 46 |
. tm Index:\\$1\t\\n%\t"\\$2" |
| 47 |
.. |
| 48 |
. if !\nF==2 \{\ |
| 49 |
. nr % 0 |
| 50 |
. nr F 2 |
| 51 |
. \} |
| 52 |
. \} |
| 53 |
.\} |
| 54 |
.rr rF |
| 55 |
.\" |
| 56 |
.\" Required to disable full justification in groff 1.23.0. |
| 57 |
.if n .ds AD l |
| 58 |
.\" ======================================================================== |
| 59 |
.\" |
| 60 |
.IX Title "GDBINIT 5" |
| 61 |
.TH GDBINIT 5 2026-04-21 gdb-16.3 "GNU Development Tools" |
| 62 |
.\" For nroff, turn off justification. Always turn off hyphenation; it makes |
| 63 |
.\" way too many mistakes in technical documents. |
| 64 |
.if n .ad l |
| 65 |
.nh |
| 66 |
.SH NAME |
| 67 |
gdbinit \- GDB initialization scripts |
| 68 |
.SH SYNOPSIS |
| 69 |
.IX Header "SYNOPSIS" |
| 70 |
/etc/gdbinit |
| 71 |
.PP |
| 72 |
~/.config/gdb/gdbinit |
| 73 |
.PP |
| 74 |
~/.gdbinit |
| 75 |
.PP |
| 76 |
\&./.gdbinit |
| 77 |
.SH DESCRIPTION |
| 78 |
.IX Header "DESCRIPTION" |
| 79 |
These files contain GDB commands to automatically execute during |
| 80 |
GDB startup. The lines of contents are canned sequences of commands, |
| 81 |
described in |
| 82 |
the GDB manual in node \f(CW\*(C`Sequences\*(C'\fR |
| 83 |
\&\-\- shell command \f(CW\*(C`info \-f gdb \-n Sequences\*(C'\fR. |
| 84 |
.PP |
| 85 |
Please read more in |
| 86 |
the GDB manual in node \f(CW\*(C`Startup\*(C'\fR |
| 87 |
\&\-\- shell command \f(CW\*(C`info \-f gdb \-n Startup\*(C'\fR. |
| 88 |
.IP \fB/etc/gdbinit\fR 4 |
| 89 |
.IX Item "/etc/gdbinit" |
| 90 |
System\-wide initialization file. It is executed unless user specified |
| 91 |
GDB option \f(CW\*(C`\-nx\*(C'\fR or \f(CW\*(C`\-n\*(C'\fR. |
| 92 |
See more in |
| 93 |
the GDB manual in node \f(CW\*(C`System\-wide configuration\*(C'\fR |
| 94 |
\&\-\- shell command \f(CW\*(C`info \-f gdb \-n \*(AqSystem\-wide configuration\*(Aq\*(C'\fR. |
| 95 |
.ie n .IP "\fB(not enabled with \fR\fB""\-\-with\-system\-gdbinit\-dir""\fR\fB during compilation)\fR" 4 |
| 96 |
.el .IP "\fB(not enabled with \fR\f(CB\-\-with\-system\-gdbinit\-dir\fR\fB during compilation)\fR" 4 |
| 97 |
.IX Item "(not enabled with --with-system-gdbinit-dir during compilation)" |
| 98 |
System\-wide initialization directory. All files in this directory are |
| 99 |
executed on startup unless user specified GDB option \f(CW\*(C`\-nx\*(C'\fR or |
| 100 |
\&\f(CW\*(C`\-n\*(C'\fR, as long as they have a recognized file extension. |
| 101 |
See more in |
| 102 |
the GDB manual in node \f(CW\*(C`System\-wide configuration\*(C'\fR |
| 103 |
\&\-\- shell command \f(CW\*(C`info \-f gdb \-n \*(AqSystem\-wide configuration\*(Aq\*(C'\fR. |
| 104 |
.IP "\fR\f(BI~/.config/gdb/gdbinit\fR\fB or \fR\f(BI~/.gdbinit\fR\fB\fR" 4 |
| 105 |
.IX Item "~/.config/gdb/gdbinit or ~/.gdbinit" |
| 106 |
User initialization file. It is executed unless user specified |
| 107 |
GDB options \f(CW\*(C`\-nx\*(C'\fR, \f(CW\*(C`\-n\*(C'\fR or \f(CW\*(C`\-nh\*(C'\fR. |
| 108 |
.IP \fR\f(BI.gdbinit\fR\fB\fR 4 |
| 109 |
.IX Item ".gdbinit" |
| 110 |
Initialization file for current directory. It may need to be enabled with |
| 111 |
GDB security command \f(CW\*(C`set auto\-load local\-gdbinit\*(C'\fR. |
| 112 |
See more in |
| 113 |
the GDB manual in node \f(CW\*(C`Init File in the Current Directory\*(C'\fR |
| 114 |
\&\-\- shell command \f(CW\*(C`info \-f gdb \-n \*(AqInit File in the Current Directory\*(Aq\*(C'\fR. |
| 115 |
.SH OPTIONS |
| 116 |
.IX Header "OPTIONS" |
| 117 |
.SH ENVIRONMENT |
| 118 |
.IX Header "ENVIRONMENT" |
| 119 |
.SH "SEE ALSO" |
| 120 |
.IX Header "SEE ALSO" |
| 121 |
\&\fBgdb\fR\|(1), \f(CW\*(C`info \-f gdb \-n Startup\*(C'\fR |
| 122 |
.PP |
| 123 |
The full documentation for GDB is maintained as a Texinfo manual. |
| 124 |
If the \f(CW\*(C`info\*(C'\fR and \f(CW\*(C`gdb\*(C'\fR programs and GDB\*(Aqs Texinfo |
| 125 |
documentation are properly installed at your site, the command |
| 126 |
.PP |
| 127 |
.Vb 1 |
| 128 |
\& info gdb |
| 129 |
.Ve |
| 130 |
.PP |
| 131 |
should give you access to the complete manual. |
| 132 |
.PP |
| 133 |
\&\fIUsing GDB: A Guide to the GNU Source\-Level Debugger\fR, |
| 134 |
Richard M. Stallman and Roland H. Pesch, July 1991. |
| 135 |
.SH COPYRIGHT |
| 136 |
.IX Header "COPYRIGHT" |
| 137 |
Copyright (c) 1988\-2024 Free Software Foundation, Inc. |
| 138 |
.PP |
| 139 |
Permission is granted to copy, distribute and/or modify this document |
| 140 |
under the terms of the GNU Free Documentation License, Version 1.3 or |
| 141 |
any later version published by the Free Software Foundation; with the |
| 142 |
Invariant Sections being "Free Software" and "Free Software Needs |
| 143 |
Free Documentation", with the Front\-Cover Texts being "A GNU Manual," |
| 144 |
and with the Back\-Cover Texts as in (a) below. |
| 145 |
.PP |
| 146 |
(a) The FSF\*(Aqs Back\-Cover Text is: "You are free to copy and modify |
| 147 |
this GNU Manual. Buying copies from GNU Press supports the FSF in |
| 148 |
developing GNU and promoting software freedom." |