Stepping Through a Program
To start and step through your program, the easiest way is to use the buttons on the Process Window’s toolbar:
To start and stop your program:
Set a breakpoint, then select
Go in the toolbar. Your program starts executing. Execution stops just before the line that contains a breakpoint or when you click
Halt.
Select
Next. TotalView starts your program, and then stops it immediately before the first statement in your
main() function.
To stop a running program, select the toolbar’s
Halt button. To restart a program, select the toolbar’s
Restart button.
To step through your program, use the
Step and
Next buttons. Both tell your program to execute the current line, but when a line has a function call
Step goes
into the function
Next completely
executes the function
If you want to get to a line without individually stepping each line in between, select the line (not the line number) to highlight it, then click the Run To button. Alternatively you can use the dskip command to define rules to skip over or through specific functions or files. You can add rules that match a function, all functions in a source file, or a specific function in a specific source file.
To step out of a function:
If you stepped into a function and want to pop out to the statement that called it, click the Out button.