Go backward to The Mode Command
Go up to Debugging Facilities
Go forward to Tracing Execution

Controlling Execution

continue
step [ integer-constant ]
break [ integer-constant { [ , ] integer-constant } ]
The debugger provides 3 commands for controlling program execution: "continue', `step', and "break'. The continue command simply exits debugging mode and resumes execution of the WC340x0 program until a breakpoint, a halt instruction or a fatal error is encountered. The step command also resumes execution of the program but only for a specified number of instructions. The command takes a single numeric argument which specifies the maximum number of steps to take before re-entering debugging mode. The interpretation of this argument is determined by the current mode of the debugger. When in source mode, it is interpreted as the number of source lines to execute before re-entering debugging mode. When in machine mode, it is interpreted as the number of machine instructions to execute.

The "break" command is used to set, clear or display breakpoints in the program. When issued with a list of numeric arguments, the command sets or clears breakpoints. The interpretation of the elements in the argument list is determined by the current mode . In source mode, the arguments are interpreted as line numbers within the source file. In machine mode, the arguments are treated as word addresses in the WC340x0 machine's memory. In either case, the effect of the command is to reverse the breakpoint setting associated with each source line or machine instruction specified. That is, if no breakpoint is set for one of the instructions specified, the command sets a breakpoint at that instruction. Conversely, if a breakpoint was currently active at an instruction specified in the argument list it is cleared.

When issued with no arguments, the break command simply lists all active breakpoints.

The debugger's mode determines which breakpoints are considered active. A breakpoint set while in machine mode becomes inactive when the debugger is switched to source mode. Such breakpoints are reactivated when the mode is switched back to machine mode.

Whenever an active breakpoint is encountered during execution, the WC340x0 program is suspended and the simulator enters debugging mode.



Prev Up Next