11.16.4. Setting a breakpoint in a C++ template

Setting a breakpoint in a C++ template might result in the breakpoint being set at multiple locations, depending on the breakpoint type.

Setting software breakpoints in a C++ template

If you set a software breakpoint in a C++ template in RAM, then be aware that the breakpoint is set on all locations where the template is instantiated. Software breakpoints are set on the locations of the template instantiations in the order they are found by RealView Debugger. A message is displayed informing you of how many breakpoints have been set, for example:

Note: breakpoint set at 2 locations.

Such a breakpoint has a single breakpoint entry in the Break/Tracepoint view. Expand the breakpoint entry to see the list of locations where the breakpoint is set. Figure 11.25 shows an example:

Figure 11.25. Breakpoint entry showing multiple C++ template instantiations

Breakpoint entry showing multiple C++ template instantiations

Setting hardware breakpoints on a C++ template

If you are setting a hardware breakpoint, then the number of breakpoints that are set is limited by your hardware resources. Hardware breakpoints are set on the locations of the template instantiations in the order they are found by RealView Debugger.

When insufficient resources are available to set all hardware breakpoint instances, then:

  • If no breakpoint resource is available, the following Error message is displayed:

    Error V2801C (Vehicle): 0x021a0101: One or more of the requested capabilities could not be set: No HW resource for HW breakpoint.
    
  • If the number of available hardware breakpoint resources is less than the number required for all breakpoint instances, then software breakpoints are set for all instances. In addition, a message is displayed informing you of how many breakpoints have been set, for example:

      Note: breakpoint set at 2 locations.
    Information: SW breakpoint set - unable to set HW breakpoint
    
Copyright © 2002-2011 ARM. All rights reserved.ARM DUI 0153N
Non-ConfidentialID052111