Patent ID: 8713371

Claim:
A data processing apparatus comprising: data processing circuitry for performing data processing operations in response to execution of program instructions; debug circuitry for performing debug operations; said data processing apparatus comprising a data store for storing a current debug exception mask value; said data processing circuitry being configured to set said current debug exception mask value to a first value in said data store in response to executing critical code and on termination of execution of said critical code to reset said current debug exception mask value to not store said first value; wherein said data processing circuitry is configured to allow a debug exception to be taken if said current debug exception mask value is not set to said first value and not to allow said debug exception to be taken if said current debug exception mask value is set to said first value, said data processing circuitry further configured to execute program instructions corresponding to a plurality of different software hierarchical levels, a higher software hierarchical level being a level with greater privileges than a lower software hierarchical level such that there are at least some data storage locations that can be accessed from said higher hierarchical level and cannot be accessed from said lower hierarchical level, and said current debug exception mask value indicating whether taking of a debug exception at a same hierarchical level as a level software is currently operating at is allowable.