Interaction between breakpoint handling in the debug hardware and your debugger

The following describe the interaction between breakpoint handling in the debug hardware and breakpoint handling in your debugger:

Break details or break capabilities

You can find out what hardware breakpoint resources are available by viewing the break details or break capabilities in your debugger.

Memory maps

Your debugger enables you to define a memory map to describe the layout and type of memory in your system. When you set a breakpoint, areas of memory that are marked as read-only, such as Flash and ROM, automatically use hardware instruction breakpoints. All other types of memory use software instruction breakpoints by default.

Stepping

When you step through code, the debugger usually sets a temporary breakpoint on the destination address. If the code is in read-only memory, or if the software breakpoint implementation requires hardware assistance, a hardware breakpoint is used for this. If you are unable to step, you might have to free up a hardware breakpoint resource.

Some processors, such as ARM9, provide dedicated single-step hardware. debug hardware uses this hardware if it is available, but steps larger than a single instruction might revert back to using breakpoints, to improve efficiency.

Note

For ARM7, ARM9, ARM11 or Cortex-A8 processors, interrupts are disabled when single-stepping with debug hardware. For the Cortex-M3 processor, interrupts are enabled when single-stepping with debug hardware.

Interrupt behavior applies only to debug hardware single-instruction stepping. Higher-level stepping depends on the strategy in your debugger, that is, whether you have used the place Breakpoint and run method, or the multiple single-instruction steps method.

Note

When hardware single-step is used, debug hardware prevents the processor from processing any pending interrupts.

Resource allocation

Debug hardware allocates hardware breakpoint resources as they are received, rather than allocating all the resources at the same time when the debugging session begins. Therefore, if you attempt to set a breakpoint when there are insufficient resources available, debug hardware displays an error message as soon as you try to set the breakpoint, rather than waiting until debugging begins.

Show/hideSee also

Copyright © 2010-2011 ARM. All rights reserved.ARM DUI 0498D
Non-ConfidentialID071311