define (gdb mode only)

Create a user-defined command.

Syntax

define [commandname]

Parameters

commandname

Name of the command to create.

Description

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:

To define a new command, enter define commandname, followed by each command on a separate line, and finally, enter end.

Example

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 

See Also


Submit feedback on this help topic

Copyright © 2001-2011, Intel Corporation. All rights reserved.