System Debug Reference Manual (32650-90888)

538 AppendixC
Emulated/Translated CM Code
Debugging Emulated CM Code
Debugging Emulated CM Code
Debugging emulated CM code is relatively straightforward. Since each CM instruction is
fetched and emulated, it is necessary to know only where you wish to set a breakpoint.
For emulated CM code you can break at any instruction:
$ cmdebug > B PROC+%6
$ cmdebug > B PROC+%10
$ cmdebug > B PROC+%15
The debugger places a special BRKP instruction at the specified addresses. When an
emulated breakpoint is encountered, the emulator traps it into Debug before the original
instruction is emulated. The environment variable
entry_mode
is set to "cm", and the user
enters CMDebug.
CM Object Code
CM Instructions
+-------------+
| PROC+%0 |
| PROC+%1 |
| PROC+%2 |
| PROC+%3 |
P > | PROC+%4 |
| PROC+%5 |
[1] | PROC+%6 | <- Breakpoints are set in the object code
| PROC+%7 | at the specified addresses
[2] | PROC+%10 |
| PROC+%11 |
| PROC+%12 |
| PROC+%13 |
| PROC+%14 |
[3] | PROC+%15 |
| PROC+%16 |
+-------------+