Create a user-defined command.
define [commandname]
commandname |
Name of the command to create. |
This command creates a new command that you define.
This command only applies when you are using the debugger in command-line mode. It has no effect when you are using the Console window in the GUI.
If a command with the name commandname already exists, the debugger prompts you to confirm the new definition.
The definition of a user-defined command may include:
Commands.
if, while, loop_break, and loop_continue commands.
Up to 10 arguments separated by whitespace. Argument names are $arg0, $arg1, $arg2, ..., $arg9. The number of arguments is held in $argc.
To define a new command, enter define commandname, followed by each command on a separate line, and finally, enter end.
The following example defines a new command, multiply, that prints the product of two numbers.
(idb) define multiply > print $arg0 * $arg1 >end
To use the multiply command to find the product of 2 and 3, enter:
(idb) multiply 2 3
Copyright © 2001-2011, Intel Corporation. All rights reserved.