Go to the first, previous, next, last section, table of contents.

# How New Commands are Created

Applications are, of course, free to take advantage of the existing GDB macro definition capability (the `define` and `document` functions).

In addition, an application can add new primitives to the GDB command language.

Function: void gdb_define_app_command (name, fn, doc)

      char * name;
      gdb_cmd_fn fn;
      char * doc;

      typedef void (*gdb_cmd_fn) (char * args);

  Create a new command call name. The new command is in the `application` help class. When invoked, the command-line arguments to the command are passed as a single string.

  Calling this function twice with the same name replaces an earlier definition, but application commands can not replace builtin commands of the same name.

  The documentation string of the command is set to a copy the string doc.

Go to the first, previous, next, last section, table of contents.