GDB(1)

πŸ“¦
version 15.1 Β· 3 versions
, in debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– GDB(1) πŸ’–

okay bestie, welcome to the User Commands section of the manual, page 1 β€” yes this is GDB(1), the GNU Debugger, and we are gonna get you so comfortable with it. grab a snack. πŸ“


✨ NAME ✨

avr-gdb β€” The GBU debugger for AVR 🫢


🌸 DESCRIPTION 🌸

hiii so this is the GNU debugger, and here's how you actually run it:

avr-gdb [options] [executable-file [core-file or process-id]]
avr-gdb [options] --args executable-file [inferior-arguments ...]

that's the whole vibe. two shapes. one of them hands extra stuff to the thing you're debugging, the other one doesn't. πŸ’…

πŸŽ€ Picking your debuggee and its files (the "who am I even looking at" section)

  • --args β€” everything after executable-file gets passed to the inferior. like, the args go to the program, not to gdb. iykyk.
  • --core=COREFILE β€” analyze the core dump COREFILE. autopsy mode πŸ¦‹
  • --exec=EXECFILE β€” use EXECFILE as the executable.
  • --pid=PID β€” attach to a running process PID. it's giving "hey i see you" πŸ‘€
  • --directory=DIR β€” search for source files in DIR.
  • --se=FILE β€” use FILE as symbol file and executable file. two for one, iconic.
  • --symbols=SYMFILE β€” read symbols from SYMFILE.
  • --readnow β€” fully read symbol files on first access. no waiting around. ⚑
  • --readnever β€” do not read symbol files. at all. periodt.
  • --write β€” set writing into executable and core files.
lowkey careful with --write, bestie, it literally turns writing on. that's the whole thing. πŸ’€

🧚 Initial commands and command files (scripting girl era)

  • --command=FILE, -x β€” execute GDB commands from FILE.
  • --init-command=FILE, -ix β€” like -x but execute commands before loading inferior.
  • --eval-command=COMMAND, -ex β€” execute a single GDB command. may be used multiple times and in conjunction with --command. stack 'em up queen πŸ‘‘
  • --init-eval-command=COMMAND, -iex β€” like -ex but before loading inferior.
  • --nh β€” do not read ~/.gdbinit. not today.
  • --nx β€” do not read any .gdbinit files in any directory. none. zero. βœ‹

🌈 Output and user interface control (the aesthetic choices)

  • --fullname β€” output information used by emacs-GDB interface.
  • --interpreter=INTERP β€” select a specific interpreter / user interface.
  • --tty=TTY β€” use TTY for input/output by the program being debugged.
  • -w β€” use the GUI interface.
  • --nw β€” do not use the GUI interface.
  • --tui β€” use a terminal user interface. tui girlies rise πŸ™ˆ
  • --dbx β€” DBX compatibility mode.
  • -q, --quiet, --silent β€” do not print version number on startup. silent but slaying.

⭐ Operating modes (what happens when)

  • --batch β€” exit after processing options.
  • --batch-silent β€” like --batch, but suppress all gdb stdout output. full mute.
  • --return-child-result β€” GDB exit code will be the child's exit code.
  • --configuration β€” print details about GDB configuration and then exit.
  • --help β€” print this message and then exit.
  • --version β€” print version information and then exit.

πŸ¦‹ Remote debugging options (long distance relationship core)

  • -b BAUDRATE β€” set serial port baud rate used for remote debugging.
  • -l TIMEOUT β€” set timeout in seconds for remote debugging.

πŸ‘‘ Other options (miscellaneous main characters)

  • --cd=DIR β€” change current directory to DIR.
  • --data-directory=DIR, -D β€” set GDB's data-directory to DIR.

At startup, GDB reads the following early init files and executes their commands:

None found.

At startup, GDB reads the following init files and executes their commands:

None found.
bestie. it found nothing. that's the whole reveal. 😭

for more information, type "help" from within GDB, or consult the GDB manual (available as on-line info or a printed manual). fr fr.


πŸ“£ REPORTING BUGS πŸ“£

report bugs to <https://www.gnu.org/software/gdb/bugs/>.

you can ask GDB-related questions on the GDB users mailing list (gdb@sourceware.org) or on GDB's IRC channel (#gdb on Freenode). the group chat is open, come thru πŸ’œ


Copyright Β© 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

no warranty bestie, i said what i said 🫢

πŸ”­ SEE ALSO πŸ”­

The full documentation for gdb is maintained as a Texinfo manual. If the info and gdb programs are properly installed at your site, the command

info gdb

should give you access to the complete manual. go read it, it's the director's cut 🌟


and that's the page!! this manual is GNU gdb (GDB) 13.2, dated September 2023 β€” so if you're reading this in a group chat somewhere in the future, that's the tea. bye bestie, go set a breakpoint πŸ’–βœ¨

πŸ“¦ where this page comes from