Debug in Depth
B-50
Copyright © 2001, 2004 ARM Limited. All rights reserved.
ARM DDI 0210C
B.14
Programming watchpoints
To make a watchpoint unit cause watchpoints on data accesses:
1.
Program its address value register with the address of the data access to be
watchpointed.
2.
Program the address mask register to
0x00000000
.
3.
Program the data value register if you require a data-dependent watchpoint. (A
data-dependent watchpoint is one that matches the data value read or written as
well as the address.) Ensure that you clear all the bits in the data mask register.
If the data value is not required, program the data mask register to
0xFFFFFFFF
(all
bits set).
4.
Program the control value register as follows:
•
nOPC
= 1
•
nRW
= 0 for a read or
nRW
= 1 for a write
•
program
MAS[1:0]
with the value corresponding to the appropriate data
size.
5.
Program the control mask register as follows:
•
nOPC
= 0
•
nRW
= 0
•
MAS[1:0]
= 0
•
all other bits set.
You can set
nRW
, or
MAS[1:0]
when both reads and writes, or data size accesses
are to be watchpointed respectively.
6.
If you wish to make the distinction between User and non-User mode data
accesses, 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
The above are examples of how to program the watchpoint register to generate
breakpoints and watchpoints. Many other ways of programming the registers are
possible. For instance, you can provide simple range breakpoints by setting one or more
of the address mask bits.
Summary of Contents for ARM7TDMI
Page 6: ...Contents vi Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Page 10: ...List of Tables x Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Page 14: ...List of Figures xiv Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Page 46: ...Introduction 1 26 Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Page 120: ...Coprocessor Interface 4 18 Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Page 142: ...Debug Interface 5 22 Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...
Page 282: ...Glossary Glossary 6 Copyright 2001 2004 ARM Limited All rights reserved ARM DDI 0210C ...