05.02.2013 Views

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Debug Events<br />

For example, if the second memory operation of an STM instruction signals a synchronous Watchpoint debug<br />

event, then when the instruction is re-tried following processing of the debug event, the first memory<br />

operation is repeated. This behavior is not normally permitted for accesses to Device or Strongly-ordered<br />

memory.<br />

To avoid this circumstance, debuggers must not set watchpoints on addresses in regions of Device or<br />

Strongly-ordered memory that might be accessed in this way. The address range masking features of<br />

watchpoints can be used to set a watchpoint on an entire region, ensuring the synchronous Watchpoint debug<br />

event is taken on the first operation of such an instruction.<br />

Asynchronous Watchpoint debug events<br />

An asynchronous Watchpoint debug event acts like a precise asynchronous abort. Its behavior is:<br />

The watchpointed instruction must have completed, <strong>and</strong> other instructions that followed it, in<br />

program order, might have completed. For more information, see Recognizing asynchronous<br />

Watchpoint debug events.<br />

The watchpoint must be taken before any exceptions that occur in program order after the watchpoint<br />

is triggered.<br />

All the registers written by the watchpointed instruction are updated.<br />

Any memory accessed by the watchpointed instruction is updated.<br />

When invasive debug is enabled <strong>and</strong> Monitor debug-mode is selected, if Watchpoint debug events are<br />

permitted an asynchronous Watchpoint debug event generates a precise asynchronous Data Abort exception.<br />

An asynchronous Watchpoint debug event is not an abort <strong>and</strong> is not affected by architectural rules about<br />

aborts, including the rules about external aborts <strong>and</strong> asynchronous aborts. An asynchronous Watchpoint<br />

debug event:<br />

is not affected by the SCR.EA bit<br />

is not ignored when the CPSR.A bit is set to 1.<br />

On an asynchronous Watchpoint debug event, the DBGDSCR.MOE field is set to Asynchronous<br />

Watchpoint occurred.<br />

Recognizing asynchronous Watchpoint debug events<br />

When an instruction that consists of multiple memory operations is accessing Device or Strongly-ordered<br />

memory, <strong>and</strong> an asynchronous Watchpoint debug event is signaled by a memory operation other than the<br />

first operation of the instruction, the debug event must not cause Debug state entry or a debug exception until<br />

all the operations have completed. This ensures the memory access rules for Device <strong>and</strong> Strongly-ordered<br />

memory are preserved.<br />

Examples of instructions that cause multiple memory operations are the LDM <strong>and</strong> LDC instructions.<br />

<strong>ARM</strong> DDI 0406B Copyright © 1996-1998, 2000, 2004-2008 <strong>ARM</strong> Limited. All rights reserved. C3-19

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!