commands (gdb mode only)

Create commands to be executed when the specified breakpoint is reached.

Syntax

commands [ID]
command_list  
end

Parameters

ID

The ID number of the breakpoint. The ID number is an unsigned integer greater than 0 and assigned to a breakpoint by the debugger.

Default: Most recently-created breakpoint.

command_list

List of IDB commands, one command per line. If you do not include this parameter, the debugger removes an existing command list from the breakpoint.

Description

This command associates a list of debugger commands with the specified breakpoint. Whenever the breakpoint stops execution, the debugger executes these commands.

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.

To enter the list, write one command per line. End the list by typing a line that contains only the keyword end.

If the breakpoint already has a command list, this command list is overwritten by the new command list. You can enter an empty command list to remove a command list from a breakpoint.

Example

(idb) commands 4
Type commands for when breakpoint 4 is hit, one per line.
End with a line saying just "end".
>print "the value of i is"
>print i
>disable 4
>end

See Also


Submit feedback on this help topic

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