You can also run gdb with a variety of arguments and options, to specify more of your debugging environment at the outset.
The command-line options described in the following discussions are designed to cover a variety of situations; in some environments, effectively, some of these options may be unavailable.
The usual way to start GDB is with one argument, specifying an executable program that you want to debug.
Taking advantage of the second command-line argument requires a fairly complete operating system; when you use GDB as a remote debugger attached to a bare board, there may not be any notion of process, and there is often no way to get a core dump.
You can run gdb
without printing the front material, which describes GDB’s non-warranty,
by specifying -silent:
To display all available options and briefly describe their use, use gdb -help as input (‘gdb -h’ is a shorter equivalent).
All options and command line
arguments you give are processed in sequential order. The order makes a
difference when using the ‘-x’
option.