CLI Support
CLI support is accessed through the Command Line view on the interface. If that view is not currently displayed, you can show it either by right-clicking in the menu and toolbar area and selecting the Command Line view in the context menu, or through the Window > Views menu.
*The dload and dattach CLI commands have the -replay option for enabling and disabling ReplayEngine. For example:
dload -replay myProgram
*The dgo, dnext, dnexti, dout, dstep, dstepi, and duntil commands let you step or run backwards by using the -back option. For example:
dnext -back
duntil -back 22
The dhistory command has the following options:
*–info
Displays the current time. The output of this command shows an integer value followed by an address. The first integer value is a virtual timestamp. This virtual timestamp does not refer to the exact point in time; it has a granularity that is typically a few lines of code. The address value is a PC value that corresponds to a precise point within that block of code.
*–enable
If the program has not been started, ReplayEngine is enabled when the program is started. If the program is already running, ReplayEngine is enabled immediately. Recording begins at the point that ReplayEngine was enabled and moving back beyond that point is not possible.
*–disable
Disables ReplayEngine for the next restart for the process.
*–create_bookmark [comment]
Creates a Replay bookmark at the current execution location so you can return to it later. You can specify an optional comment to this command and it will be stored with the bookmark for display when you use the show_bookmarks command. A bookmark is created with a unique numeric ID, which is the return value
*–goto_bookmark ID
Goes to the bookmark with the specified ID. This returns the focus process to the execution location where the bookmark was first created.
*–go_live
Resets the process back to record mode.
*–show_bookmarks
Displays all Replay bookmarks. This command shows the bookmark ID along with information about what line number, PC and function the bookmark is on. If you added a comment to help you remember the significance of the bookmark, it displays this as well.
*–delete_bookmark ID
Deletes the bookmark with the given ID.
*–clear_bookmarks
Deletes all Replay bookmarks.
*–get_time — Deprecated. Use the bookmark options.
Displays the current time. The output of this command shows an integer value followed by an address. The first integer value is a virtual timestamp. This virtual timestamp does not refer to the exact point in time; it has a granularity that is typically a few lines of code. The address value is a PC value that corresponds to a precise point within that block of code.
*–go_time time — Deprecated. Use the bookmark options.
Moves the process to an execution point represented by the time argument. The time argument is a virtual timestamp as reported by dhistory -get_time. You cannot use this command to move to a specific instruction but you can use it to get to within a small block of code (usually within a few lines of your intended point in execution history). This command is typically used either for roughly bookmarking a point in code or for searching execution history. It may need to be combined with stepping and duntil commands to return to an exact position.
These CLI commands are explained in detail in the TotalView Reference Guide.