You can always ask GDB itself for information on its commands,
using the command
h) with no arguments to display a short list of named classes of commands:
(gdb) help List of classes of commands: aliases -- Aliases of other commands breakpoints -- Making program stop at certain points data -- Examining data files -- Specifying and examining files internals -- Maintenance commands obscure -- Obscure features running -- Running the program stack -- Examining the stack status -- Status inquiries support -- Support facilities tracepoints -- Tracing of program execution without
stopping the program user-defined -- User-defined commands Type "help" followed by a class name for a list of commands in that class. Type "help" followed by command name for full documentation. Command name abbreviations are allowed if unambiguous. (gdb)
(gdb) help status Status inquiries. List of commands: info -- Generic command for showing things about the program being debugged show -- Generic command for showing things about the debugger Type "help" followed by command name for full documentation. Command name abbreviations are allowed if unambiguous. (gdb)
helpargument, GDB displays a short paragraph on how to use that command.
apropos argscommand searches through all of the GDB commands, and their documentation, for the regular expression specified in args. It prints out all matches found. For example:
apropos reloadresults in:
set symbol-reloading -- Set dynamic symbol table reloading multiple times in one run show symbol-reloading -- Show dynamic symbol table reloading multiple times in one run
complete argscommand lists all the possible completions for the beginning of a command. Use args to specify the beginning of the command you want completed. For example:
complete iresults in:
if ignore info inspectThis is intended for use by GNU Emacs.
In addition to
help, you can use the GDB commands
show to inquire about the state of your program, or the state
of GDB itself. Each command supports many topics of inquiry; this
manual introduces each of them in the appropriate context. The listings
info and under
show in the Index point to
all the sub-commands. See section Index.
i) is for describing the state of your program. For example, you can list the arguments given to your program with
info args, list the registers currently in use with
info registers, or list the breakpoints you have set with
info breakpoints. You can get a complete list of the
set. For example, you can set the GDB prompt to a $-sign with
set prompt $.
showis for describing the state of GDB itself. You can change most of the things you can
show, by using the related command
set; for example, you can control what number system is used for displays with
set radix, or simply inquire which is currently in use with
show radix. To display all the settable parameters and their current values, you can use
showwith no arguments; you may also use
info set. Both commands produce the same display.
Here are three miscellaneous
show subcommands, all of which are
exceptional in lacking corresponding
Go to the first, previous, next, last section, table of contents.