
11-4
G2 PowerPC Core Reference Manual
For More Information On This Product,
Go to: www.freescale.com
MOTOROLA
Expanded Debugging Facilities in Breakpoint Registers
IABR[BE] and IABR2[BE] enable and control instruction address breakpoint, and IBCR
controls match conditions (see Section 2.1.2.14.1, “Instruction Address Breakpoint Control
Registers (IBCR)—G2_LE Only,” for more details). DABR[29–31] and DABR2[29–31]
enable and control data address breakpoint and DBCR controls match conditions.
When MSR[SE] (single-step trace enable) is set, the processor core generates a trace
exception (0x00D00) upon the successful completion of the next instruction. When the
MSR[BE] (branch trace enable) is set, the processor core generates a trace exception
(0x00D00) upon the successful completion of a branch instruction.
11.2 Expanded Debugging Facilities in Breakpoint
Registers
Breakpoint, single-step, and branch trace enable, address and combinational matching are
additional debugging facilities provided by the breakpoint registers (DABR, DABR2,
IABR, and IABR2).
11.2.1 Breakpoint Enabled
When an instruction address breakpoint is set, and a condition is matched, an instruction
address breakpoint exception (0x01300) occurs along with executing the matched
instruction. The instruction retires after it has returned from the exception. When a data and
a condition are matched, a DSI exception (0x00300) occurs along with executing the
matched instruction. The instruction retires after it has returned from the exception and has
updated all memory or registers.
11.2.2 Single-Step Enabled
Single-stepping can be a very useful tool in software debugging. This debug feature
executes one instruction before it takes a trace exception. In trace exception, the result is
being examined after that one instruction has executed.
When MSR[SE] (single-step trace enable) is set, the processor generates a trace exception
(0x00D00) upon the successful completion of the next instruction. A trace exception is not
taken for an
isync
,
sync
,
rfi
,
rfci
,
or
mtmsr
instructions. If softstop or hardstop is enabled,
and MSR[SE]
bit is set, the machine with stop before the present instruction is retired and
not take a trace exception.
MSR can be set by using
mtmsr
or by setting the SRR0 bit corresponding to MSR[SE]
before returning from an interrupt. If the SRR0 is set after returning from the interrupt,
single-step is enabled by executing one instruction along with taking the trace exception.
A typical software debugging procedure is to set a instruction address breakpoint at the
instruction address to be single stepped. When the IABR exception is taken, the exception
F
Freescale Semiconductor, Inc.
n
.