GDB's command handling is intended to be extensible. A set of
functions (defined in cli-decode.h
) provide
that extensibility.
GDB groups its commands into a number of command lists (of
struct cmd_list_element), pointed to by
a number of global variables (defined in
cli-cmds.h
). Of these, cmdlist
is the list of all defined commands. Separate lists define
sub-commands of various top level commands. For example
infolist
is the list of all info
sub-commands.
Commands are also classified according the the area they address, for
example commands that provide support, commands that examine data,
commands for file handling etc. These classes are specified by
enum command_class, defined in
command.h
. These classes provide the top level
categories in which help will be given.