Trace On Change Of Control Flow - Motorola M68CPU32BUG User Manual

Debug monitor
Table of Contents

Advertisement

TC

3.31 TRACE ON CHANGE OF CONTROL FLOW

TC [<count>]
Use the TC command to start execution at the address in the target PC. Tracing begins at
detection of an instruction that causes a change of control flow, such as Bcc, JSR, BSR, RTS,
etc. Execution is in real time until a change of flow instruction is encountered. The optional
count field specifies the number of change of flow instructions to be traced before returning
control to CPU32Bug. The optional count field default is 1. Register display printout only occurs
when a change of control flow occurs.
During tracing, breakpoints in ROM or write protected memory are monitored (but not inserted)
for all trace commands which allow the use of breakpoints. Note that the TC command
recognizes a breakpoint only if it is at a change of flow instruction. Control is returned to
CPU32Bug if a breakpoint with 0 count is encountered. See the trace (T) command for more
details.
The trace functions are implemented with the trace bits (T0, T1) in the MCU device status
register. Do not modify the trace bits (T0, T1) while using the trace commands. Because the trace
functions are implemented using the hardware trace bits in the MCU, code in ROM can be
traced. During trace mode, breakpoints are monitored and their counts decremented when the
corresponding instruction with breakpoint is traced. This allows breakpoints to work in ROM,
but only in the trace mode.
EXAMPLE
The following program resides at location $7000.
CPU32Bug>MD 7000;DI<CR>
00007000 2200
00007002 4282
00007004 D401
00007006 E289
00007008 66FA
0000700A E20A
0000700C 55C2
0000700E 60FE
CPU32Bug>
Initialize PC and D0:
CPU32Bug>RM PC <CR>
PC
=00008000 ? 7000.<CR>
CPU32Bug>RM D0 <CR>
D0
=00000000 ? 8F41C.<CR>
M68CPU32BUG/D REV 1
Trace On Change Of Control Flow
MOVE.L
CLR.L
ADD.B
LSR.L
BNE.B
LSR.B
SCS.B
BRA.B
3-63
DEBUG MONITOR COMMANDS
D0,D1
D2
D1,D2
#$1,D1
$7004
#$1,D2
D2
$700E
TC

Advertisement

Table of Contents
loading

Table of Contents