GDB(1) GNU Development Tools GDB(1) gdb - (SYNOPSIS) gdb [OPTIONS] [prog|prog procID|prog core] (DESCRIPTION) GDB "" -- (crash) . GDB ( ) : o . o . o . o . GDB C C++ Fortran Modula-2 . GDB "gdb" . "quit" "exit" GDB . GDB "help" . "gdb" GDB : gdb program core : gdb program core (ID) "-p" : gdb program 1234 gdb -p 1234 GDB 1234 . -p program . GDB : break [file:][function|line] (breakpoint) function line ( file). run [arglist] ( arglist ). bt (Backtrace): (stack) . print expr . c ( ). next ( ) (over). edit [file:]function . list [file:]function . step ( ) (into). help [name] name GDB GDB. quit exit GDB. GDB Using GDB: A Guide to the GNU Source-Level Debugger Richard M. Stallman Roland H. Pesch . "gdb" "info" ..SH " (OPTIONS)" core ( ID) --se ( ) -c . . . - -- --help . GDB : "--option=value" "--option value" "-option=value" "-option value" "--o=value" "--o value" "-o=value" "-o value" . -x . --help -h . --symbols=file -s file (symbol table) file. --write core. --exec=file -e file file core dump. --se=file file . --core=file -c file file core dump . --command=file -x file GDB file. --eval-command=command -ex command GDB command. --init-eval-command=command -iex GDB command (inferior). --directory=directory -d directory directory . --nh ~/.config/gdb/gdbinit ~/.gdbinit ~/.config/gdb/gdbearlyinit ~/.gdbearlyinit . --nx -n .gdbinit .gdbearlyinit . --quiet --silent -q " ". . (batch mode) . --batch (batch mode). -x ( .gdbinit ) 0 . GDB . GDB Program exited normally. ( GDB ) . --batch-silent --batch . GDB ( stderr ). --silent . Loading section . "stdout" GDB . --args prog [arglist] (inferior) . : gdb ./a.out -q GDB -q . : gdb --args ./a.out -q GDB inferior . --pid=pid GDB (PID) pid..IP "--tui" 4 (TUI) . --readnow symfile . --readnever . --return-child-result GDB . --configuration GDB . --version . --cd=directory GDB directory . --data-directory=directory -D GDB directory . GDB . --fullname -f Emacs GDB . GDB ( ) . \032 (:) . Emacs-to-GDB \032 . -b baudrate (baud rate ) GDB . -l timeout (timeout) . --tty=device device . (ENVIRONMENT) (SEE ALSO) GDB Texinfo . "info" "gdb" Texinfo GDB info gdb . Using GDB: A Guide to the GNU Source-Level Debugger . (Richard M. Stallman) . (Roland H. Pesch) . (COPYRIGHT) (c) 1988-2025 Free Software Foundation, Inc. / (GNU Free Documentation License) . "Free Software" "Free Software Needs Free Documentation" "A GNU Manual" () . () FSF : " GNU . GNU Press (FSF) GNU ." gdb-17.1 2025-12-20 GDB(1)