⌘K
Options (3)
-p, --pidbooleanAttach a process to `gdb`
Example:
gdb {{[-p|--pid]}} {{procID}}-c, --corebooleanDebug with a core file
Example:
gdb {{[-c|--core]}} {{path/to/core}} {{path/to/executable}}--eval-commandbooleanExecute given GDB commands upon start
Example:
gdb {{[-ex|--eval-command]}} "{{commands}}" {{path/to/executable}}Examples (6)
Debug an executable
gdb path/to/executableAttach a process to `gdb`
gdb [-p|--pid] procIDDebug with a core file
gdb [-c|--core] path/to/core path/to/executableExecute given GDB commands upon start
gdb [-ex|--eval-command] "commands" path/to/executableStart `gdb` and pass arguments to the executable
gdb --args path/to/executable argument1 argument2 ...Skip `debuginfod` and pagination prompts and then print the backtrace
gdb [-c|--core] path/to/core path/to/executable -iex 'set debuginfod enabled on' -iex 'set pagination off' -ex btmade by @shridhargupta | data from tldr-pages