
Hitachi Embedded Workshop User Manual
155
2.12
Break Conditions
The simulator/debugger provides the following conditions for interrupting the simulation of a user program
during execution.
Break due to the satisfaction of a break command condition
Break due to the detection of an error during execution of the user program
Break due to a trace buffer overflow
Break due to execution of the SLEEP instruction
Break due to the [STOP] button
Break Due to Satisfaction of a Break Command Condition: There are five break commands as follows:
BREAKPOINT:
Break based on the address of the instruction executed
BREAK_ACCESS:
Break based on access to a memory range
BREAK_DATA:
Break based on the value of data written to memory
BREAK_REGISTER:
Break based on the value of data written to a register
BREAK_SEQUENCE:
Break based on a specified execution sequence
If [Stop] is specified as the action for when a break condition is satisfied, user program execution stops when the
break condition is satisfied. For details, refer to section 4.15, Using the Simulator/Debugger Breakpoints.
When a break condition is satisfied and user program execution stops, the instruction at the breakpoint may or
may not be executed before a break depending on the type of break, as listed in table 2.3.
Table 2.3
Processing When a Break Condition is Satisfied
Command
Instruction When a Break Condition is Satisfied
BREAKPOINT
Not executed
BREAK_ACCESS
Executed
BREAK_CYCLE
Executed
BREAK_DATA
Executed
BREAK_REGISTER
Executed
BREAK_SEQUENCE
Not executed
For BREAKPOINT and BREAK_SEQUENCE, if a breakpoint is specified at an address other than the
beginning of the instruction, the break will not be detected.
When a break condition is satisfied during user program execution, a break condition satisfaction message is
displayed on the status bar and execution stops.
Break Due to Error Detection during User Program Execution: The simulator/debugger detects simulation
errors, that is, program errors that cannot be detected by the CPU exception generation functions. The [Simulator
System] dialog box specifies whether to stop or continue the simulation when such an error occurs. Table 2.4
lists the error messages, error causes, and the action of the simulator/debugger in the continuation mode.