- IAR Embedded Workbench for Arm 9.70.x
- C-SPY Debugging
- Breakpoints
- Reference information on breakpoints
- Data breakpoints dialog box
Data breakpoints dialog box
What do you want to do?
Learn about:
Learn how to:
Get reference information about the Data breakpoints dialog box, see below the line.

The Data breakpoints dialog box is available from the context menu in the editor window, Breakpoints window, the Memory window, and in the Disassembly window.

This figure reflects the C-SPY simulator.
Use the Data breakpoints dialog box to set a data breakpoint, see Setting breakpoints using the dialog box. Data breakpoints never stop execution within a single instruction. They are recorded and reported after the instruction is executed.
Requirements
One of these alternatives:
The C-SPY simulator
The C-SPY CMSIS-DAP driver
The C-SPY GDB Server driver
The C-SPY G+LINK driver
The C-SPY I-jet driver
The C-SPY J-Link/J-Trace driver
The C-SPY ST-LINK driver
The C-SPY TI MSP-FET driver
The C-SPY TI Stellaris driver
The C-SPY TI XDS driver and a Cortex-M device
Break At
Specify the data location of the breakpoint in the text box. Alternatively, click the Edit button to open the Enter Location dialog box, see Enter Location dialog box.
Access Type
Selects the type of memory access that triggers the breakpoint:
- Read/Write
Reads from or writes to location.
- Read
Reads from location.
- Write
Writes to location.
Size
Determines whether there should be a size—in practice, a range—of locations where the breakpoint will trigger. Each fetch access to the specified memory range will trigger the breakpoint. Select how to specify the size:
- Auto
The size will automatically be based on the type of expression the breakpoint is set on. For example, if you set the breakpoint on a 12-byte structure, the size of the breakpoint will be 12 bytes.
- Manual
Specify the size of the breakpoint range in the text box.
For data breakpoints, this can be useful if you want the breakpoint to be triggered on accesses to data structures, such as arrays, structs, and unions.
Action
Specify a valid C-SPY expression, which is evaluated when the breakpoint is triggered and the condition is true. For more information, see Useful breakpoint hints.
Conditions
Specify simple or complex conditions:
- Expression
Specify a valid C-SPY expression, see C-SPY expressions.
- Condition true
The breakpoint is triggered if the value of the expression is true.
- Condition changed
The breakpoint is triggered if the value of the expression has changed since it was last evaluated.
- Skip count
The number of times that the breakpoint condition must be fulfilled before the breakpoint starts triggering. After that, the breakpoint will trigger every time the condition is fulfilled.
Trigger range
Shows the requested range and the effective range to be covered by the trace. The range suggested is either within or exactly the area specified by the Break At and the Size options.
- Extend to cover requested range
Extends the breakpoint so that a whole data structure is covered. For data structures that do not fit the size of the possible breakpoint ranges supplied by the hardware breakpoint unit, for example three bytes, the breakpoint range will not cover the whole data structure. Note that the breakpoint range will be extended beyond the size of the data structure, which might cause false triggers at adjacent data.
The Trigger range option is available for all C-SPY hardware drivers that support data breakpoints.
Match data
Enables matching of the accessed data. Use the Match data options in combination with the access types for data. This option can be useful when you want a trigger when a variable has a certain value.
- Value
Specify a data value.
- Mask
Specify which part of the value to match (word, halfword, or byte).
For Cortex-M, the data mask is limited to one of these exact values:
0xFFFFFFFF, which means that the complete word must match.0xFFFF, which means that the match can be either the upper or lower 16-bit part of a word or halfword.0xFF, which means that the match can be either the upper, middle, or lower 8-bit part of a word, halfword, or byte. For example, for the data0xVV, any 32-bit access matching axxxxxxVV,xxxxVVxx,xxVVxxxx, orVVxxxxxxpattern, and any 16-bit access matchingxxVVorVVxx, and an 8-bit access with exact match triggers the breakpoint.
The Match data options are only available for I-jet, I-jet Trace, J-Link/J-Trace and ST-LINK, and when using an Arm7/9 or a Cortex-M device.
Note
For Cortex-M devices, only one breakpoint with Match data can be set. Such a breakpoint uses two hardware breakpoints.
Note
The Match Data options are not available for Cortex-M0, Cortex-M1, and Cortex-M0+, and they are not supported by all ARMv8-M devices.