Debug in Depth
B-48
Copyright © 2001, 2004 ARM Limited. All rights reserved.
ARM DDI 0210C
Note
In monitor mode, you must set the EmbeddedICE-RT disable bit (bit [5] in the debug
control register) before changing the register values, and clear it on completion of the
programming.
B.13.2
Software breakpoints
To make a watchpoint unit cause software breakpoints on instruction fetches of a
particular bit pattern:
1.
Program its address mask register to
0xFFFFFFFF
(all bits set) so that the address is
disregarded.
2.
Program the data value register with the particular bit pattern that has been chosen
to represent a software breakpoint.
If you are programming a Thumb software breakpoint, repeat the 16-bit pattern
in both halves of the data value register. For example, if the bit pattern is
0xDEEE
,
program
0xDEEEDEEE
. When a 16-bit instruction is fetched, EmbeddedICE-RT
compares only the valid half of the data bus against the contents of the data value
register. In this way, you can use a single watchpoint register to catch software
breakpoints on both the upper and lower halves of the data bus.
3.
Program the data mask register to
0x00000000
.
4.
Program the control value register with
nOPC
= 0.
5.
Program the control mask register with
nOPC
= 0 and all other bits to 1.
6.
If you wish to make the distinction between User and non-User mode instruction
fetches, program the
nTRANS
bit in the control value and control mask registers
accordingly.
7.
If required, program the
EXTERN
,
RANGE
, and
CHAIN
bits in the same way.
Note
You do not have to program the address value register.
Setting the breakpoint
To set the software breakpoint:
1.
Read the instruction at the desired address and store it away.
2.
Write the special bit pattern representing a software breakpoint at the address.
Содержание ARM7TDMI
Страница 6: ...Contents vi Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Страница 10: ...List of Tables x Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Страница 14: ...List of Figures xiv Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Страница 46: ...Introduction 1 26 Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Страница 120: ...Coprocessor Interface 4 18 Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Страница 142: ...Debug Interface 5 22 Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Страница 276: ...Differences Between Rev 3a and Rev 4 C 6 Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Страница 282: ...Glossary Glossary 6 Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...