A
data processing apparatus includes a
processing circuitry configured to execute a modified version of an application
machine code defining the application. The modified version of the application
machine code comprises one or more direct or
indirect branch instructions and one or more
machine code instructions being one or more target instructions for the one or more direct or
indirect branch instructions. During the execution of the modified version of the application
machine code, the
processing circuitry is further configured to update a first register value in a first register and a second register value in a second register and to trigger an exception, based on the first register value and the second register value and / or when the one or more direct or
indirect branch instructions target an instruction of the modified version of the application
machine code.