| |||
| Home > Setting Breakpoints > About setting breakpoints > Software and hardware breakpoints | |||
RealView Debugger enables you to set software or hardware breakpoints, depending on your target memory type (see Breakpoints in different memory map regions).
These breakpoints are placed by RealView Debugger by temporarily modifying program memory with a special instruction opcode. Because RealView Debugger requires write access to program memory, software breakpoints can only be set in RAM.
Hardware breakpoints are implemented by EmbeddedICE® logic that monitors the address and data buses of your processor. For simulated targets, hardware breakpoints are implemented by your simulator software. The complexity and number of breakpoints you can set depends on:
hardware support provided by your target processor
the Target Access used to maintain the connection.
RealView Debugger can reserve one breakpoint unit for internal use. Therefore, there might be one less breakpoint available to you. An error message is displayed if you try to set a hardware breakpoint when the limit is reached.
If advanced breakpoint support is provided by your target processor or simulator software (for example RVISS), you can set more complex hardware breakpoints. These breakpoints might be data-dependent or take advantage of range functionality. For example, some processors enable you to chain two breakpoints together, so that the breakpoint activates only when the conditions of both breakpoints are met.
Check your vendor-supplied documentation, to determine the breakpoint capability of your hardware. Also, see Viewing the target hardware breakpoint support.
You cannot set breakpoints on core registers. However, you can set breakpoints on memory mapped registers (see Setting breakpoints on custom memory mapped registers for details).
The number of hardware breakpoints supported by your debug target is both architecture and design specific. RealView Debugger menu options related to hardware breakpoints are grayed out if your target cannot support them.
Be aware of the following:
A software breakpoint uses a hardware breakpoint resource, and all software breakpoints share this same resource. Therefore, if you run out of hardware breakpoint resource:
You can set a breakpoint only if a software breakpoint is already set. If you are trying the set a hardware breakpoint, then a software breakpoint is set instead, and the following message is displayed in the Cmd tab of the Output pane:
Information: SW breakpoint set - unable to set HW breakpoint
If the existing breakpoints are all hardware breakpoints, then you cannot set another breakpoint. if you attempt to set another breakpoint, an error message is displayed in the Cmd tab of the Output pane.
If you enable a Memory Management Unit (MMU) that sets a region of memory containing a software breakpoint to read-only, then the software breakpoint cannot be removed. In this case, you must make sure you clear software breakpoints before enabling the MMU. Also, only hardware breakpoints can be set in ROM.
If RealView Debugger cannot set breakpoints, rapid instruction step is used for high-level stepping (see Chapter 8 Executing Images for more details about stepping). A message is also displayed to explain the type of step being used.
When working with hardware breakpoints with RealView ARMulator® ISS (RVISS):
Watchpoints are available. These are called hardware breakpoints in RealView Debugger. You can access them through the Debug ? Breakpoints ? Hardware menu. These data access breakpoints are implemented using a memory hook.
Hardware breakpoints can use address ranges (see Specifying address ranges), data values, and data value range tests. They can also specify data size, processor mode, and pass counts.
Hardware breakpoints can be chained to form complex breakpoint conditions.