Chapter 18: Connecting the Emulator to a Target System
Installing Emulator Features
When stepping over instructions that cause the processor to take exceptions, the
trace list can look very different. Most exceptions preempt the trace exception until
after their exception handler runs. Other exceptions (like TRAP, CHK and CHK2)
create their stack frame and then take the trace exception. Any exceptions cause
the step trace list to look different. In all cases, the monitor is still entered through
the interrupt 7 exception.
For all exceptions except TRAP, CHK, and CHK2, the trace stack frame will be
missing when the monitor is entered. Instead of using the trace stack frame, the
exception stack frame will be used. The emulator detects that and issues an error
message that says stepping failed. This error message does not actually indicate a
problem with emulator stepping; it just indicates that an exception was hit. The
emulator is stopped at the starting address of the exception handler, and stepping
can be resumed.
The TRAP, CHK, and CHK2 exceptions will have an additional stack frame when
the monitor is entered. The exception stack frame will precede the normal trace
and interrupt stack frames. These exceptions do not cause the monitor to issue an
error message so multiple steps will not stop on this type of exception.
650