The debugger maintains a command history, so you can repeat commands that you have already entered in the debugger. This command history persists across debugging sessions.
To repeat the last command line do one of the following:
Press the up arrow once, then press Enter.
Enter two exclamation points (!!).
Press Enter.
Enter !-1.
To repeat a command line entered during the current debugging session:
Enter an exclamation point (!) followed by either the integer or the first part of the string associated with the command line.
For example, 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.
Use a completely empty line to repeat the last command, as opposed to the last line, which could have been a comment or a syntactically invalid attempt at a command.
Use command line editing to recall and modify commands you have already entered.
It is often useful to have a text editor up and running while debugging, and use it to assemble short scripts that you can copy and paste to the debugger. Keep a separate text file that has such scripts in it, as well as other notes you want to keep. This provides continuity from one debugging session to the next, and from one day to the next.
If you place commands in a file, you can execute them directly from the file rather than cutting and pasting them to the terminal.
Copyright © 2001-2011, Intel Corporation. All rights reserved.