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 Exceptions<br />

C4.1 About debug exceptions<br />

A debug exception is taken when:<br />

a permitted Software debug event occurs when invasive debug is enabled <strong>and</strong> Monitor debug-mode<br />

is selected<br />

a BKPT instruction is executed when one of:<br />

— invasive debug is disabled<br />

— the debug event is not permitted<br />

— no debug-mode is selected.<br />

For more information, see Table C3-1 on page C3-2. You must be careful when programming certain events<br />

because you might leave the processor in an unrecoverable state. See Unpredictable behavior on Software<br />

debug events on page C3-24.<br />

How the processor h<strong>and</strong>les the debug exception depends on the cause of the exception, <strong>and</strong> is described in:<br />

Debug exception on Breakpoint, BKPT Instruction or Vector Catch debug events<br />

Debug exception on Watchpoint debug event on page C4-3.<br />

Halting debug events never cause a debug exception. The Halting debug events are:<br />

External Debug Request debug event<br />

Halt Request debug event<br />

OS Unlock Catch debug event.<br />

C4.1.1 Debug exception on Breakpoint, BKPT Instruction or Vector Catch debug events<br />

If the cause of the debug exception is a Breakpoint, BKPT Instruction, or a Vector Catch debug event, the<br />

processor performs the following actions:<br />

Sets the DBGDSCR.MOE bits according to Table C10-3 on page C10-26.<br />

Sets the IFSR <strong>and</strong> IFAR as described in Effects of debug exceptions on CP15 registers <strong>and</strong> the<br />

DBGWFAR on page C4-4.<br />

Generates a Prefetch Abort exception, see Prefetch Abort exception on page B1-54<br />

The Prefetch Abort h<strong>and</strong>ler is responsible for checking the IFSR bits to find out whether the exception entry<br />

was caused by a debug exception. If it was, typically the h<strong>and</strong>ler branches to the debug monitor.<br />

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

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

Saved successfully!

Ooh no, something went wrong!