Before you replay your program’s statements, you must stop your program’s execution. You can do this by halting your program, or TotalView can stop execution when your program encounters a breakpoint. When execution stops, TotalView ungrays the ReplayEngine buttons you can use on its tool bar (Figure 1)
• GoBack, which tells ReplayEngine to display the state that existed at the last action point. If no action point is encountered, ReplayEngine displays the state that existed at the start of its recorded history.
• Prev, which tells ReplayEngine to display the state that existed when the previous statement executed. If that line had a function call, Prev skips over the call.
• Unstep, which tells ReplayEngine to display the state that existed when the previous statement executed. If that line had a function call, ReplayEngine moves to the last statement in that function.
• Caller, which tells ReplayEngine to display the state that existed before the current routine was called.
• BackTo, which tells ReplayEngine to display the program’s state for the line you select. This line must have executed prior to the currently displayed line. If you wish to move forward within replay mode, select a line and select the Run To button.
• Live, which tells ReplayEngine to shift from replay mode to record mode. It also displays the statement that would have executed if you had not moved into ReplayMode.
• Save, which saves the current replay recording session to a file. If the Save icon does not appear on the toolbar, then expand the Process window.
NOTE >> The ReplayEngine tool bar commands appear only if you are using TotalView on a Linux-x86 (32-bit) or Linux-x86-64 machine. On these platforms, these buttons are permanently grayed out if you do not have a ReplayEngine license.
When you need to move forward within the program’s history, you can use the Step, Next, Run To, and Out buttons. These commands do the same thing in replay or record modes.
You can also set breakpoints in previously executed statements. After setting a breakpoint, pressing the Go button will move you to that statement. You can transform a breakpoint to an eval point if the eval point uses simple expressions such as “if (x==y+z) $stop”. You cannot, however, create barrier points.
If you reach the line that would have been executed if you hadn’t gone into replay mode, you are automatically switched back to record mode and you can then resume program execution. You can also switch back to record mode by pressing the Live button.