Repeat a command in the command history.
!! ![-]step_number !string
step_number |
The number of steps backward or forward in the history. When you include a minus (-), the debugger starts with the most recent command in the history and counts backwards. When you do not include a minus, the debugger starts with the oldest command in the history and counts foward. |
string |
The string that begins the line in the history that you want to repeat. |
The exclamation point (!) repeats a command in the debugger's command history.
The debugger assembles lines in the history into a new, usable command according to the following rules.
If the second character is also an exclamation point, the assembled line is replaced by the most recent entry from the history list. The debugger appends any remaining characters after the exclamation point to the assembled line.
The debugger ignores spaces and tabs immediately following the exclamation point, and executes one of the following actions:
If the next character is a number, then the debugger reads the number as a decimal number, and replaces the assembled line with the line in the history list whose ID matches the number, where 1 is the oldest entry, 2 the second oldest and so on.
If the next character is a minus (-) followed by a number, then the debugger reads the number as a decimal number, and replaces the assembled line with the line in the history list whose ID matches the number, where -1 is the most recent entry, -2 the second most recent entry and so on.
The debugger uses the rest of the line to find the most recent command that starts with those characters, and replaces the assembled line with that line from the history list.
In the first two cases, any remaining characters after the exclamation point or digits are appended to the assembled line.
You cannot use exclamation points in command lists built with braces ({}), although you can use them in scripts. For example, the command line {print 3; !!3} does not parse.
To repeat the seventh command used in the current debugging session, enter !7.
To repeat the third most recent command, enter !-3.
To repeat a command that started with bp, enter !bp.
To repeat the previous command, enter !!.
!!:$ designates the last parameter of the preceding command.
!fi:2 designates the second parameter of the most recent command starting with the characters fi.
Copyright © 1996-2010, Intel Corporation. All rights reserved.