Reverse Debugging with ReplayEngine
ReplayEngine is a separately licensed product for Linux-x86 (32-bit) and Linux-x86-64 that records all your program’s activities as it executes within TotalView. After recording information, you can move forward and backward within these previously executed instructions.
To enable ReplayEngine, select Enable reverse debugging with Replay Engine on the Debug Options tab after choosing either:
*File > Debug New Program to launch the Program Session dialog
*File > Debug New Parallel Program to launch the Parallel Program Session dialog
*File > Attach to Running Program to launch the Attach to a Running Program dialog
Figure 31 Enabling using File > Debug New Program
For a new program, ReplayEngine begins recording instructions as soon as you start program execution. For a running process you have attached to, ReplayEngine starts recording the next time you restart the process.
You can also enable ReplayEngine by selecting the Record button in the Process window’s toolbar or by using the TotalView -replay command-line option:
dload -replay program-path
dattach -replay program-path
The ReplayEngine commands are on the toolbar, Figure 32
Figure 32 Tool Bar with ReplayEngine Buttons
When replaying instructions, your program’s state is displayed as it was when that instruction was executed. The displayed information is read-only. For example, you cannot change the value of variables.
Existing execution commands work when replaying instructions. For example, you can use the Step or Out commands to move forward in the program’s history.
Only when you reach the statement that would have executed outside of “replay mode” is the program put back into “record mode.” For example, suppose you are at line 100 and you select line 25 and press the BackTo button. If you use commands that move forward in replay mode such as Step, you will switch from replay mode to record mode when get you back to line 100.
Because you can see previously executed instructions, you can quickly locate where a problem began to occur.
Reverse debugging
Reverse debugging is discussed in a separate user guide, Reverse Debugging with ReplayEngine