Contents|Index|Previous|Next
User-defined commands

A user-defined command is a sequence of GDB commands to which you assign a new name as a command. This is done with the define command. User commands may accept up to 10 arguments separated by whitespace. Arguments are accessed within the user command via $arg0 ...$arg9. A trivial example is the following declaration. To execute the command use the following declaration. This defines the command adder, which prints the sum of its three arguments.

The following documentation discusses user-defined commands.


Top|Contents|Index|Previous|Next